mirror of
https://github.com/wailsapp/wails.git
synced 2026-03-14 14:45:49 +01:00
Fix Windows systray icon regression (#4706)
* Fix Windows systray icon regression (#4704)
This fixes a regression introduced in commit d58d4ba where the systray
icon no longer defaults to the application icon when no custom icon is
provided.
The issue was that the default icon loading was changed from:
defaultIcon := w32.LoadIconWithResourceID(w32.GetModuleHandle(""), w32.RT_ICON)
To:
defaultIcon := getNativeApplication().windowClass.Icon
This caused the systray to display the default Wails icon instead of
the application's custom icon.
The fix reverts the default icon loading back to using
w32.LoadIconWithResourceID with w32.RT_ICON, which correctly loads
the application's icon resource.
Fixes: #4704
* Update changelog for systray icon fix
---------
Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
parent
c3b169f0d3
commit
54d5b989bb
2 changed files with 2 additions and 1 deletions
|
|
@ -23,6 +23,7 @@ After processing, the content will be moved to the main changelog and this file
|
|||
|
||||
## Fixed
|
||||
<!-- Bug fixes -->
|
||||
- Fix Windows systray icon not defaulting to application icon when no custom icon is provided (#4704)
|
||||
|
||||
## Deprecated
|
||||
<!-- Soon-to-be removed features -->
|
||||
|
|
|
|||
|
|
@ -225,7 +225,7 @@ func (s *windowsSystemTray) run() {
|
|||
s.uid = uint32(s.parent.id)
|
||||
|
||||
// Resolve the base icons once so we can reuse them for light/dark modes
|
||||
defaultIcon := getNativeApplication().windowClass.Icon
|
||||
defaultIcon := w32.LoadIconWithResourceID(w32.GetModuleHandle(""), w32.RT_ICON)
|
||||
|
||||
// Priority: custom icon > default app icon > built-in icon
|
||||
if s.parent.icon != nil {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue