mirror of
https://github.com/netbirdio/netbird.git
synced 2026-10-08 06:29:08 +02:00
escape ampersand in tray menu labels on Windows
Win32 swallows a lone & in an MFT_STRING menu item as the mnemonic prefix, so "Help & Support" rendered as "Help Support". Add a build-tagged menuLabel() helper that doubles & to && on Windows and is the identity on macOS/Linux (which render & literally), and apply it to the About submenu label.
This commit is contained in:
+1
-1
@@ -459,7 +459,7 @@ func (t *Tray) buildMenu() *application.Menu {
|
||||
SetAccelerator("CmdOrCtrl+,").
|
||||
OnClick(func(*application.Context) { t.svc.WindowManager.OpenSettings("") })
|
||||
|
||||
aboutLabel := t.loc.T("tray.menu.about")
|
||||
aboutLabel := menuLabel(t.loc.T("tray.menu.about"))
|
||||
about := menu.AddSubmenu(aboutLabel)
|
||||
about.Add(t.loc.T("tray.menu.github")).OnClick(func(*application.Context) {
|
||||
_ = t.app.Browser.OpenURL(urlGitHubRepo)
|
||||
|
||||
Reference in New Issue
Block a user