tray: show NetBird brand mark next to About on macOS

NSMenuItem rejected the dedicated netbird-menu-24.png brand mark
(rendered muddy) and the full 256x256 brand PNG (stretched the row).
Ship an 18x18 sips-downscale of assets/netbird.png — same source the
legacy Fyne client used for its About row — to sit visually alongside
the cap-height of the surrounding text.
This commit is contained in:
Zoltan Papp
2026-05-26 11:40:30 +02:00
parent 18d0019332
commit b6d20edfeb
3 changed files with 12 additions and 13 deletions
+4 -4
View File
@@ -403,10 +403,10 @@ func (t *Tray) buildMenu() *application.Menu {
aboutLabel := t.loc.T("tray.menu.about")
about := menu.AddSubmenu(aboutLabel)
// iconMenuNetbird is empty on macOS — NSMenuItem.setImage stretches
// the row to the leading image's pixel size, and the result looks
// out of place next to the unadorned rows above and below. Skip the
// brand mark there and keep the row text-only.
// iconMenuNetbird is the brand mark painted in the leading-image slot
// of the About row. The icons_menu_<os>.go files own the per-platform
// asset choice — guard with len() so a platform that opts out (sets
// it to an empty []byte) still renders the row text-only.
if aboutItem := menu.FindByLabel(aboutLabel); aboutItem != nil && len(iconMenuNetbird) > 0 {
aboutItem.SetBitmap(iconMenuNetbird)
}