1
0

text-only keys: transparent bg in web UI, #21252b bg on device

This commit is contained in:
Maksim Totmin 2026-06-22 10:14:06 +07:00
parent e676b74c32
commit 3eaf9dc0c4
2 changed files with 2 additions and 2 deletions

View File

@ -313,7 +313,7 @@ func (pm *PageManager) renderKey(idx int, k *config.KeyConfig) {
}
slog.Warn("invalid background color", "value", k.Background, "error", err)
}
if err := pm.deck.WriteText(idx, k.Label, image.Black, fontName, fontSize); err != nil {
if err := pm.deck.WriteText(idx, k.Label, color.RGBA{0x21, 0x25, 0x2b, 0xff}, fontName, fontSize); err != nil {
slog.Warn("write text", "error", err)
}
} else if k.Background != "" {

View File

@ -123,7 +123,7 @@ func composeImageWithLabel(src image.Image, text string, keySize int, fontSize f
}
func renderTextImage(text string, keySize int, fontSize float64) image.Image {
rgba := blankImage(keySize, color.RGBA{0, 0, 0, 255}).(*image.RGBA)
rgba := blankImage(keySize, color.RGBA{0, 0, 0, 0}).(*image.RGBA)
if text != "" {
face, err := parseDisplayFace(fontSize)