[client/ui-wails] Set NetBird window and app icon on Linux

Wails3 falls back to its bundled bird logo when no Icon is supplied via
application.Options or LinuxWindow. Embed the 256x256 NetBird PNG and
wire it through both fields, plus set ProgramName=netbird so GTK's
g_set_prgname picks up the icon from the installed .desktop file. Tested
on Fedora 40 + KDE Plasma; the titlebar and taskbar now show the NetBird
logo.
This commit is contained in:
Zoltán Papp
2026-05-04 14:34:45 +02:00
parent a1743dbf9b
commit df58935cc0
3 changed files with 10 additions and 0 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.7 KiB

View File

@@ -49,3 +49,6 @@ var iconUpdateConnectedMacOS []byte
//go:embed assets/netbird-systemtray-update-disconnected-macos.png
var iconUpdateDisconnectedMacOS []byte
//go:embed assets/netbird.png
var iconWindow []byte

View File

@@ -69,12 +69,16 @@ func main() {
app := application.New(application.Options{
Name: "netbird-ui",
Description: "NetBird desktop client",
Icon: iconWindow,
Assets: application.AssetOptions{
Handler: application.AssetFileServerFS(assets),
},
Mac: application.MacOptions{
ApplicationShouldTerminateAfterLastWindowClosed: false,
},
Linux: application.LinuxOptions{
ProgramName: "netbird",
},
SingleInstance: &application.SingleInstanceOptions{
UniqueID: "io.netbird.ui",
OnSecondInstanceLaunch: func(_ application.SecondInstanceData) {
@@ -112,6 +116,9 @@ func main() {
Backdrop: application.MacBackdropTranslucent,
TitleBar: application.MacTitleBarHiddenInset,
},
Linux: application.LinuxWindow{
Icon: iconWindow,
},
})
// Intercept the window close to hide instead of quit. The user reaches