mirror of
https://github.com/netbirdio/netbird.git
synced 2026-09-09 00:11:28 +02:00
Linux now shows monochrome (black/white silhouette) tray icons instead of the colored orange PNGs, matching the macOS template look. Since Wails' Linux SNI backend ignores SetDarkModeIcon (its setDarkModeIcon just calls setIcon, last-write-wins) and the SNI spec carries no panel light/dark hint, the panel color scheme is detected in-process and the black-vs-white silhouette is chosen in iconForState, pushed via a single SetIcon. Detection order (tray_theme_linux.go): freedesktop Settings portal (org.freedesktop.appearance/color-scheme) -> GTK_THEME env (:dark suffix) -> default dark. A SettingChanged subscription repaints live on theme flips. macOS (template) and Windows (colored) paths are unchanged. Icons are 48x48 mono PNGs (3% margin) generated from the macOS silhouettes.
12 lines
500 B
Go
12 lines
500 B
Go
//go:build !linux || (linux && 386)
|
|
|
|
package main
|
|
|
|
// startTrayTheme is a no-op off Linux: macOS uses template icons (the OS
|
|
// recolours them per menubar appearance) and Windows ships colored PNGs, so
|
|
// neither needs the freedesktop colour-scheme probe that the Linux build
|
|
// uses to choose between the black and white monochrome silhouettes. Left
|
|
// callable so NewTray can invoke it unconditionally; panelDark stays nil and
|
|
// panelIsDark returns its default.
|
|
func (t *Tray) startTrayTheme() {}
|