MirrorBar+ 9: bar color, more icon colors, upright logo on vertical bar

Part of MirrorBar+ 9 (bar color, logo shapes, clock size and bold, hide battery, volume and wifi).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JW57ZsfD68JfyDt93j58v9
This commit is contained in:
2026-11-12 22:38:54 +00:00
co-authored by Claude Sonnet 5.5
parent fc1d82d790
commit 2a76d1d9c9
+14
View File
@@ -58,6 +58,12 @@ var palette = []namedColor{
{"Pink", 255, 125, 195},
{"Purple", 175, 115, 240},
{"Black", 0, 0, 0},
{"Dark green", 20, 120, 55},
{"Teal", 0, 160, 160},
{"Navy", 30, 60, 160},
{"Maroon", 140, 30, 50},
{"Gray", 140, 140, 150},
{"Lime", 150, 220, 40},
}
var (
@@ -215,6 +221,9 @@ func renderLayer(screen uintptr, w, h int32, fills, fg bool, base uintptr) []uin
}
}
if fg {
if logoStyle != 0 {
drawLogoStyle(memV, mapRect(sr, h))
}
for i, r := range appRects(w, h) {
if i < len(apps) {
drawAppGlyph(memV, mapRect(rect{r.Left + px(2), r.Top + px(3), r.Right - px(2), r.Bottom - px(3)}, h), apps[i])
@@ -324,6 +333,8 @@ func redraw(hwnd uintptr) {
a := uint32(bgAlpha)
hoverA := max(a, 120)
barC := barRGB()
lightBar := barIsLight()
length := float64(max(fw, fh))
rad := float64(min(fw, fh)) / 2
stride := int(fw) * superSample
@@ -336,6 +347,9 @@ func redraw(hwnd uintptr) {
bgA := a
if c != colBg {
bgA = hoverA
c = hoverTint(c, lightBar)
} else {
c = barC
}
bgR := (c >> 16 & 0xFF) * bgA / 255
bgG := (c >> 8 & 0xFF) * bgA / 255