mirror of
https://github.com/netbirdio/netbird.git
synced 2026-05-06 00:56:39 +00:00
[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:
BIN
client/ui-wails/assets/netbird.png
Normal file
BIN
client/ui-wails/assets/netbird.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.7 KiB |
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user