From 999ccb73002e2a71c6dfa3e22d6eb40759b6d8bc Mon Sep 17 00:00:00 2001 From: mixeme Date: Wed, 24 Jun 2026 23:02:06 +0300 Subject: [PATCH] refactor: unify icon asset naming to use size-based scheme MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Rename icon files from mixed naming (big/16x16) to consistent size-based names (large/small) for clarity. Update Go functions and variables to reference the new asset names. This makes the icon pipeline easier to understand and maintain. File changes: - gosentry-icon-big.png → gosentry-icon-large.png - gosentry-icon-16x16.png → gosentry-icon-small.png - gosentry-icon-16x16.ico → gosentry-icon-small.ico - Embedded variable: iconBytes → iconLargeBytes for clarity Co-Authored-By: Claude Haiku 4.5 --- assets/assets.go | 30 +++++++++--------- ...y-icon-big.png => gosentry-icon-large.png} | Bin ...icon-16x16.ico => gosentry-icon-small.ico} | Bin ...icon-16x16.png => gosentry-icon-small.png} | Bin 4 files changed, 15 insertions(+), 15 deletions(-) rename assets/{gosentry-icon-big.png => gosentry-icon-large.png} (100%) rename assets/{gosentry-icon-16x16.ico => gosentry-icon-small.ico} (100%) rename assets/{gosentry-icon-16x16.png => gosentry-icon-small.png} (100%) diff --git a/assets/assets.go b/assets/assets.go index 33f1247..82e1951 100644 --- a/assets/assets.go +++ b/assets/assets.go @@ -26,13 +26,13 @@ import ( // leaves the anti-aliased edge fully opaque as a light halo that reads as a // border on a dark taskbar/tray, so the background is removed with feathered // color-to-alpha instead): -// - gosentry-icon-big.png detailed large artwork (teal rounded-tile emblem) -// - gosentry-icon-16x16.png hand-tuned for legibility at 16px -// - gosentry.ico multi-size 16/32/48/256 (16 = the hand-tuned PNG, -// the rest downscaled from big). Embedded into the PE -// binary by windres (see scripts/build-windows.bat), -// NOT via Go embed. -// - gosentry-icon-16x16.ico single 16px frame, for the Windows tray +// - gosentry-icon-large.png detailed large artwork (teal rounded-tile emblem) +// - gosentry-icon-small.png hand-tuned for legibility at 16px +// - gosentry.ico multi-size 16/32/48/256 (16 = the hand-tuned PNG, +// the rest downscaled from large). Embedded into the PE +// binary by windres (see scripts/build-windows.bat), +// NOT via Go embed. +// - gosentry-icon-small.ico single 16px frame, for the Windows tray // // Windows: // - Window titlebar + taskbar: the multi-size gosentry.ico, embedded by the .rc @@ -54,20 +54,20 @@ import ( // - Tray: SetSystemTrayIcon(Icon()). StatusNotifierItem renders 22-48px and takes // a PNG, so the big artwork scales down cleanly (the 16x16 would look tiny). -//go:embed gosentry-icon-16x16.png +//go:embed gosentry-icon-small.png var iconSmallBytes []byte -//go:embed gosentry-icon-big.png -var iconBytes []byte +//go:embed gosentry-icon-large.png +var iconLargeBytes []byte -//go:embed gosentry-icon-16x16.ico +//go:embed gosentry-icon-small.ico var iconSmallICOBytes []byte // IconSmall returns the hand-tuned 16x16 PNG. It is the Linux window-titlebar // icon (via a.SetIcon -> _NET_WM_ICON, which the WM renders at ~16px). On Windows // the titlebar comes from gosentry.ico instead; see the package strategy above. func IconSmall() fyne.Resource { - return fyne.NewStaticResource("gosentry-icon-16x16.png", iconSmallBytes) + return fyne.NewStaticResource("gosentry-icon-small.png", iconSmallBytes) } // IconSmallICO returns a single-frame 16x16 Windows .ico of the hand-tuned small @@ -75,18 +75,18 @@ func IconSmall() fyne.Resource { // pinning a single 16x16 frame keeps the hand-tuned glyph crisp at tray size — a // multi-size .ico lets the tray pick and downscale a larger, muddier frame. func IconSmallICO() fyne.Resource { - return fyne.NewStaticResource("gosentry-icon-16x16.ico", iconSmallICOBytes) + return fyne.NewStaticResource("gosentry-icon-small.ico", iconSmallICOBytes) } // Icon returns the large artwork PNG. It is the Linux tray icon (StatusNotifierItem // renders 22-48px) and the source for the Linux .desktop dock icon via IconBytes. // The Windows window/taskbar icon comes from gosentry.ico, not this resource. func Icon() fyne.Resource { - return fyne.NewStaticResource("gosentry-icon-big.png", iconBytes) + return fyne.NewStaticResource("gosentry-icon-large.png", iconLargeBytes) } // IconBytes is the large artwork as raw PNG bytes for InstallDesktopIcon, which // writes the Linux .desktop launcher/dock icon. func IconBytes() []byte { - return append([]byte(nil), iconBytes...) + return append([]byte(nil), iconLargeBytes...) } diff --git a/assets/gosentry-icon-big.png b/assets/gosentry-icon-large.png similarity index 100% rename from assets/gosentry-icon-big.png rename to assets/gosentry-icon-large.png diff --git a/assets/gosentry-icon-16x16.ico b/assets/gosentry-icon-small.ico similarity index 100% rename from assets/gosentry-icon-16x16.ico rename to assets/gosentry-icon-small.ico diff --git a/assets/gosentry-icon-16x16.png b/assets/gosentry-icon-small.png similarity index 100% rename from assets/gosentry-icon-16x16.png rename to assets/gosentry-icon-small.png