From d5a9e0bfb63605555a1b3edcd0eca8e4f65adde2 Mon Sep 17 00:00:00 2001 From: Gabe Cook Date: Thu, 14 Nov 2024 16:54:55 -0600 Subject: [PATCH] fix(tray): Fix dynamic icon color comparison --- internal/tray/systray.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/internal/tray/systray.go b/internal/tray/systray.go index bd511f2..5354ad0 100644 --- a/internal/tray/systray.go +++ b/internal/tray/systray.go @@ -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 color.NRGBAModel.Convert(color.White) == t.config.DynamicIcon.FontColor.Color { systray.SetTemplateIcon(icon, icon) - default: + } else { systray.SetIcon(icon) } } else {