fix(ui): Use grey background for disabled modules with white text

Disabled modules now show grey background instead of dimmed colors.
All modules (enabled and disabled) use consistent white text.
This commit is contained in:
Stu Leak 2025-12-31 13:06:39 -05:00
parent 9f55604d69
commit c4d31b31bc

View File

@ -148,16 +148,11 @@ func getContrastColor(bgColor color.Color) color.Color {
func (m *ModuleTile) CreateRenderer() fyne.WidgetRenderer {
tileColor := m.color
// Use consistent white text for all modules
labelColor := TextColor // White text
labelColor := TextColor // White text for all modules
// Dim disabled tiles
// Grey background for disabled tiles
if !m.enabled {
// Reduce opacity by mixing with dark background
if c, ok := m.color.(color.NRGBA); ok {
tileColor = color.NRGBA{R: c.R / 3, G: c.G / 3, B: c.B / 3, A: c.A}
}
labelColor = color.NRGBA{R: 100, G: 100, B: 100, A: 255}
tileColor = color.NRGBA{R: 80, G: 80, B: 80, A: 255}
}
bg := canvas.NewRectangle(tileColor)