From 2d3c8fc555040a6b3d26e9dd19d2010a5db1b8cc Mon Sep 17 00:00:00 2001 From: Zoltan Papp Date: Tue, 26 May 2026 23:25:45 +0200 Subject: [PATCH] tray: drop dead iconMenuNetbird and openRoute after menu rework The menu reorganisation removed the About brand-mark bitmap and rerouted every openRoute caller to WindowManager auxiliary windows, leaving both the iconMenuNetbird embed (all three platforms) and the openRoute helper unreferenced. Remove them so the unused linter passes. --- client/ui/icons_menu_darwin.go | 11 ----------- client/ui/icons_menu_linux.go | 13 ++----------- client/ui/icons_menu_windows.go | 14 +++----------- client/ui/tray.go | 9 --------- 4 files changed, 5 insertions(+), 42 deletions(-) diff --git a/client/ui/icons_menu_darwin.go b/client/ui/icons_menu_darwin.go index 6b943d2bf..f705d6630 100644 --- a/client/ui/icons_menu_darwin.go +++ b/client/ui/icons_menu_darwin.go @@ -9,17 +9,6 @@ import _ "embed" // weight of the surrounding row text. Windows ships a 16x16 variant // (Win32 SM_CXMENUCHECK slot) and Linux a 24x24 variant (GTK menu row // supports the larger range) — see the sibling icons_menu_*.go files. -// -// iconMenuNetbird on macOS is an 18x18 downscale of the 256x256 brand -// PNG (assets/netbird.png — the same file the legacy Fyne client used -// for its About row). Sized to sit visually alongside the row text — -// the full 256x256 source stretched the row vertically, 22x22 read -// noticeably larger than the surrounding "A" of "About", and 14x14 -// shrank below the cap height. 18 keeps the brand mark legible without -// dominating the row. - -//go:embed assets/netbird-menu-about-18.png -var iconMenuNetbird []byte //go:embed assets/netbird-menu-dot-connected-22.png var iconMenuDotConnected []byte diff --git a/client/ui/icons_menu_linux.go b/client/ui/icons_menu_linux.go index 8a562c639..fb68ea737 100644 --- a/client/ui/icons_menu_linux.go +++ b/client/ui/icons_menu_linux.go @@ -9,17 +9,8 @@ import _ "embed" // cleanly next to the row text across the GNOME / KDE / minimal-WM // flavours we ship to. Windows ships a 16x16 variant (Win32 // SM_CXMENUCHECK slot) and macOS a 22x22 variant — see the sibling -// icons_menu_*.go files. -// -// Regenerate the brand mark from assets/svg/netbird-menu.svg (vector -// source — re-rendering keeps the strokes crisp at every target size): -// inkscape assets/svg/netbird-menu.svg -o netbird-menu-24.png -w 24 -h 24 \ -// --export-background-opacity=0 -// Status dots are the canonical 24x24 originals used everywhere else -// in the legacy Fyne tray. - -//go:embed assets/netbird-menu-24.png -var iconMenuNetbird []byte +// icons_menu_*.go files. Status dots are the canonical 24x24 originals +// used everywhere else in the legacy Fyne tray. //go:embed assets/netbird-menu-dot-connected.png var iconMenuDotConnected []byte diff --git a/client/ui/icons_menu_windows.go b/client/ui/icons_menu_windows.go index d2b44af60..2e1cb7597 100644 --- a/client/ui/icons_menu_windows.go +++ b/client/ui/icons_menu_windows.go @@ -8,21 +8,13 @@ import _ "embed" // paints the HBITMAP into the check-mark slot, sized to SM_CXMENUCHECK / // SM_CYMENUCHECK (typically 16x16 at 100% DPI). Larger bitmaps overflow // the row visually, so Windows ships its own scaled set instead of the -// 24x24 assets used on macOS/Linux. Regenerate the brand mark from -// assets/svg/netbird-menu.svg (vector source — re-rendering keeps the -// strokes crisp at every target size): -// inkscape assets/svg/netbird-menu.svg -o netbird-menu-16.png -w 16 -h 16 \ -// --export-background-opacity=0 -// The status dots are downscaled from the 24x24 originals with -// ImageMagick — simple solid-fill circles survive the bicubic resize -// without visible quality loss: +// 24x24 assets used on macOS/Linux. The status dots are downscaled from +// the 24x24 originals with ImageMagick — simple solid-fill circles +// survive the bicubic resize without visible quality loss: // magick netbird-menu-dot-.png -resize 16x16 \ // -background none -gravity center -extent 16x16 \ // netbird-menu-dot--16.png -//go:embed assets/netbird-menu-16.png -var iconMenuNetbird []byte - //go:embed assets/netbird-menu-dot-connected-16.png var iconMenuDotConnected []byte diff --git a/client/ui/tray.go b/client/ui/tray.go index 950967d55..a65d72e8d 100644 --- a/client/ui/tray.go +++ b/client/ui/tray.go @@ -454,15 +454,6 @@ func (t *Tray) buildMenu() *application.Menu { return menu } -func (t *Tray) openRoute(route string) { - if t.window == nil { - return - } - t.window.Show() - t.window.Focus() - t.window.SetURL("/#" + route) -} - func (t *Tray) handleConnect() { // NeedsLogin/SessionExpired/LoginFailed mean the daemon won't honor a // plain Up RPC ("up already in progress: current status NeedsLogin") —