Skip to content

Commit

Permalink
fix(tray): Fix dynamic icon color comparison
Browse files Browse the repository at this point in the history
  • Loading branch information
gabe565 committed Nov 14, 2024
1 parent 6f75950 commit e03748c
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ go 1.23.3

require (
fyne.io/systray v1.11.0
gabe565.com/utils v0.0.0-20241114041836-facb2857c9b1
gabe565.com/utils v0.0.0-20241114234101-e128cd3269b5
github.com/Masterminds/sprig/v3 v3.3.0
github.com/dmarkham/enumer v1.5.10
github.com/emersion/go-autostart v0.0.0-20210130080809-00ed301c8e9a
Expand Down
4 changes: 2 additions & 2 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ dario.cat/mergo v1.0.1 h1:Ra4+bf83h2ztPIQYNP99R6m+Y7KfnARDfID+a+vLl4s=
dario.cat/mergo v1.0.1/go.mod h1:uNxQE+84aUszobStD9th8a29P2fMDhsBdgRYvZOxGmk=
fyne.io/systray v1.11.0 h1:D9HISlxSkx+jHSniMBR6fCFOUjk1x/OOOJLa9lJYAKg=
fyne.io/systray v1.11.0/go.mod h1:RVwqP9nYMo7h5zViCBHri2FgjXF7H2cub7MAq4NSoLs=
gabe565.com/utils v0.0.0-20241114041836-facb2857c9b1 h1:Y7L3PkUDFFhEOxaN+vhqstaPNqlE8K55wdHonon2Ux4=
gabe565.com/utils v0.0.0-20241114041836-facb2857c9b1/go.mod h1:1WioSVukwGZYG4Q0LJBnRhgYyVljmW2Izl+RW36ALUc=
gabe565.com/utils v0.0.0-20241114234101-e128cd3269b5 h1:uqtftvk1FMAsFPAT9ICLLntGsZHmrghgIGBClVCsVHk=
gabe565.com/utils v0.0.0-20241114234101-e128cd3269b5/go.mod h1:1WioSVukwGZYG4Q0LJBnRhgYyVljmW2Izl+RW36ALUc=
github.com/Masterminds/goutils v1.1.1 h1:5nUrii3FMTL5diU80unEVvNevw1nH4+ZV4DSLVJLSYI=
github.com/Masterminds/goutils v1.1.1/go.mod h1:8cTjp+g8YejhMuvIA5y2vz3BpJxksy863GQaJW2MFNU=
github.com/Masterminds/semver/v3 v3.3.0 h1:B8LGeaivUe71a5qox1ICM/JLl0NqZSW5CHyL+hmvYS0=
Expand Down
5 changes: 2 additions & 3 deletions internal/tray/systray.go
Original file line number Diff line number Diff line change
Expand Up @@ -155,10 +155,9 @@ func (t *Tray) onReady(ctx context.Context) func() { //nolint:gocyclo
} else {
if icon, err := t.dynamicIcon.Generate(msg.Properties); err == nil {
systray.SetTitle("")
switch t.config.DynamicIcon.FontColor.Color {
case color.White:
if t.config.DynamicIcon.FontColor.Color == color.White {
systray.SetTemplateIcon(icon, icon)
default:
} else {
systray.SetIcon(icon)
}
} else {
Expand Down

0 comments on commit e03748c

Please sign in to comment.