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:
@@ -58,6 +58,12 @@ var palette = []namedColor{
|
|||||||
{"Pink", 255, 125, 195},
|
{"Pink", 255, 125, 195},
|
||||||
{"Purple", 175, 115, 240},
|
{"Purple", 175, 115, 240},
|
||||||
{"Black", 0, 0, 0},
|
{"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 (
|
var (
|
||||||
@@ -215,6 +221,9 @@ func renderLayer(screen uintptr, w, h int32, fills, fg bool, base uintptr) []uin
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if fg {
|
if fg {
|
||||||
|
if logoStyle != 0 {
|
||||||
|
drawLogoStyle(memV, mapRect(sr, h))
|
||||||
|
}
|
||||||
for i, r := range appRects(w, h) {
|
for i, r := range appRects(w, h) {
|
||||||
if i < len(apps) {
|
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])
|
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)
|
a := uint32(bgAlpha)
|
||||||
hoverA := max(a, 120)
|
hoverA := max(a, 120)
|
||||||
|
barC := barRGB()
|
||||||
|
lightBar := barIsLight()
|
||||||
length := float64(max(fw, fh))
|
length := float64(max(fw, fh))
|
||||||
rad := float64(min(fw, fh)) / 2
|
rad := float64(min(fw, fh)) / 2
|
||||||
stride := int(fw) * superSample
|
stride := int(fw) * superSample
|
||||||
@@ -336,6 +347,9 @@ func redraw(hwnd uintptr) {
|
|||||||
bgA := a
|
bgA := a
|
||||||
if c != colBg {
|
if c != colBg {
|
||||||
bgA = hoverA
|
bgA = hoverA
|
||||||
|
c = hoverTint(c, lightBar)
|
||||||
|
} else {
|
||||||
|
c = barC
|
||||||
}
|
}
|
||||||
bgR := (c >> 16 & 0xFF) * bgA / 255
|
bgR := (c >> 16 & 0xFF) * bgA / 255
|
||||||
bgG := (c >> 8 & 0xFF) * bgA / 255
|
bgG := (c >> 8 & 0xFF) * bgA / 255
|
||||||
|
|||||||
Reference in New Issue
Block a user