1
0

Fix rendering of keys with background only (no icon or label)

This commit is contained in:
Maksim Totmin 2026-06-17 20:28:25 +07:00
parent 56a5cb5bba
commit 1a63da9171

View File

@ -249,6 +249,13 @@ func (pm *PageManager) renderKey(idx int, k *config.KeyConfig) {
if err := pm.deck.WriteText(idx, k.Label, image.Black, fontName, fontSize); err != nil { if err := pm.deck.WriteText(idx, k.Label, image.Black, fontName, fontSize); err != nil {
slog.Warn("write text", "error", err) slog.Warn("write text", "error", err)
} }
} else if k.Background != "" {
bg, err := parseHexColor(k.Background)
if err == nil {
pm.deck.FillColor(idx, bg.R, bg.G, bg.B)
} else {
slog.Warn("invalid background color", "value", k.Background, "error", err)
}
} }
} }