feat(icons): clean tray badge set + Start menu/installer icon

New cmd/icon-gen renders the four state badges (Red/Yellow/Green/Blue) as a
rounded-square badge with a subtle vertical gradient and a crisp white theta,
256px with 4x4 supersampling. The tray embeds these (icons.go, generated) and
builds a proper multi-size Windows ICO (16..256) via exact box filtering --
replacing the old flat 48px circle and nearest-neighbour scaling.

The installer now bundles theta-agent.ico (multi-size, Blue badge) and uses it
for the Start menu 'Theta Agent Tray' shortcut, the setup.exe icon
(SetupIconFile), and the uninstaller display icon. Dead duplicate icon arrays
in the root package (tray_icons.go) removed.
This commit is contained in:
2026-08-10 18:49:30 -07:00
parent 1b332cacab
commit 12d55a4454
8 changed files with 3408 additions and 40 deletions
File diff suppressed because it is too large Load Diff
File diff suppressed because one or more lines are too long
+5 -2
View File
@@ -23,8 +23,8 @@ func TestPNGToIco(t *testing.T) {
t.Errorf("type must be 1 (icon)")
}
count := int(ico[4]) | int(ico[5])<<8
if count != 3 {
t.Fatalf("expected 3 icon entries, got %d", count)
if count != len(iconSizes) {
t.Fatalf("expected %d icon entries, got %d", len(iconSizes), count)
}
// Each ICONDIRENTRY: valid size, planes=1, bpp=32, DIB with BITMAPINFOHEADER.
@@ -38,6 +38,9 @@ func TestPNGToIco(t *testing.T) {
if h == 0 {
h = 256
}
if w != iconSizes[i] || h != iconSizes[i] {
t.Errorf("entry %d: encoded size %dx%d, want %dx%d", i, w, h, iconSizes[i], iconSizes[i])
}
planes := int(ico[e+4]) | int(ico[e+5])<<8
bpp := int(ico[e+6]) | int(ico[e+7])<<8
size := int(ico[e+8]) | int(ico[e+9])<<8 | int(ico[e+10])<<16 | int(ico[e+11])<<24