From 3723fe2956e650088d4fd9dd902c77f26c54d03f Mon Sep 17 00:00:00 2001 From: 1leozhao Date: Thu, 26 Jun 2025 16:48:07 -0500 Subject: [PATCH 1/4] fix bug 451 --- ui/theme/theme.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ui/theme/theme.go b/ui/theme/theme.go index 6482491..9e9acae 100644 --- a/ui/theme/theme.go +++ b/ui/theme/theme.go @@ -134,7 +134,9 @@ func (m *MyTheme) Color(name fyne.ThemeColorName, defVariant fyne.ThemeVariant) if variant == theme.VariantDark { return color.White } - return color.Black + // For light theme, use a darker version of the foreground color instead of pure black + foreground := colorOrDefault(colors.Foreground, defColors.Foreground, theme.ColorNameForeground, variant) + return darkenColor(foreground, 0.3) case ColorNameIconButton: foreground := colorOrDefault(colors.Foreground, defColors.Foreground, theme.ColorNameForeground, variant) if variant == theme.VariantDark { From 085c7854c919bb83e121280ca568893827bcd8a4 Mon Sep 17 00:00:00 2001 From: 1leozhao Date: Fri, 27 Jun 2025 00:14:08 -0500 Subject: [PATCH 2/4] bug fix 451 --- ui/theme/theme.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ui/theme/theme.go b/ui/theme/theme.go index 9e9acae..f8c5f5b 100644 --- a/ui/theme/theme.go +++ b/ui/theme/theme.go @@ -134,9 +134,9 @@ func (m *MyTheme) Color(name fyne.ThemeColorName, defVariant fyne.ThemeVariant) if variant == theme.VariantDark { return color.White } - // For light theme, use a darker version of the foreground color instead of pure black + // For light theme, use a darker version of the foreground color foreground := colorOrDefault(colors.Foreground, defColors.Foreground, theme.ColorNameForeground, variant) - return darkenColor(foreground, 0.3) + return darkenColor(foreground, 0.33) case ColorNameIconButton: foreground := colorOrDefault(colors.Foreground, defColors.Foreground, theme.ColorNameForeground, variant) if variant == theme.VariantDark { From 63b8621c7922b4dc5e5d4b12b451e8570c9feaa9 Mon Sep 17 00:00:00 2001 From: Drew Weymouth Date: Fri, 27 Jun 2025 17:03:00 -0700 Subject: [PATCH 3/4] apply similar logic for dark theme --- ui/theme/theme.go | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/ui/theme/theme.go b/ui/theme/theme.go index f8c5f5b..7ae0002 100644 --- a/ui/theme/theme.go +++ b/ui/theme/theme.go @@ -131,11 +131,12 @@ func (m *MyTheme) Color(name fyne.ThemeColorName, defVariant fyne.ThemeVariant) disabled := colorOrDefault(colors.Disabled, defColors.Disabled, theme.ColorNameDisabled, variant) return BlendColors(foreground, disabled, 0.33) case ColorNameHoveredIconButton: - if variant == theme.VariantDark { - return color.White - } - // For light theme, use a darker version of the foreground color foreground := colorOrDefault(colors.Foreground, defColors.Foreground, theme.ColorNameForeground, variant) + if variant == theme.VariantDark { + // For dark theme, use a lighter version of the foreground color for hover + return lightenColor(foreground, 0.33) + } + // For light theme, use a darker version of the foreground color for hover return darkenColor(foreground, 0.33) case ColorNameIconButton: foreground := colorOrDefault(colors.Foreground, defColors.Foreground, theme.ColorNameForeground, variant) From 4022a1d83df06eb7064fa7b9d637a4c1f552461c Mon Sep 17 00:00:00 2001 From: Drew Weymouth Date: Fri, 27 Jun 2025 17:50:49 -0700 Subject: [PATCH 4/4] fix function name --- ui/theme/theme.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ui/theme/theme.go b/ui/theme/theme.go index 7ae0002..9c1d517 100644 --- a/ui/theme/theme.go +++ b/ui/theme/theme.go @@ -134,7 +134,7 @@ func (m *MyTheme) Color(name fyne.ThemeColorName, defVariant fyne.ThemeVariant) foreground := colorOrDefault(colors.Foreground, defColors.Foreground, theme.ColorNameForeground, variant) if variant == theme.VariantDark { // For dark theme, use a lighter version of the foreground color for hover - return lightenColor(foreground, 0.33) + return brightenColor(foreground, 0.33) } // For light theme, use a darker version of the foreground color for hover return darkenColor(foreground, 0.33)