Skip to content

Commit 93f1df4

Browse files
committedJan 26, 2025
dark and light icons
1 parent 065f2ab commit 93f1df4

File tree

4 files changed

+11
-3
lines changed

4 files changed

+11
-3
lines changed
 

‎pkg/agent/icon/icon.go

+5-2
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,8 @@ package icon
22

33
import _ "embed"
44

5-
//go:embed icon_mono.png
6-
var Icon []byte
5+
//go:embed icon_light.png
6+
var IconLight []byte
7+
8+
//go:embed icon_dark.png
9+
var IconDark []byte

‎pkg/agent/icon/icon_dark.png

41.4 KB
Loading
File renamed without changes.

‎pkg/agent/tray.go

+6-1
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,17 @@ func (a *Agent) startSystray() {
2323
panic(err) // handle properly please!
2424
}
2525
}, func(b bool) {
26+
if b {
27+
systray.SetIcon(icon.IconLight)
28+
} else {
29+
systray.SetIcon(icon.IconDark)
30+
}
2631
})
2732
}
2833

2934
func (a *Agent) systrayReady() {
3035
a.systrayStarted = true
31-
systray.SetIcon(icon.Icon)
36+
systray.SetTemplateIcon(icon.IconLight, icon.IconLight)
3237
a.systrayConfigUpdate()
3338
}
3439

0 commit comments

Comments
 (0)