1
0
mirror of https://github.com/garraflavatra/rolens.git synced 2025-01-18 13:07:58 +00:00

Add window menu for Mac

This commit is contained in:
Romein van Buren 2023-06-24 22:10:25 +02:00
parent f5366a9ad5
commit aaed7a59f7
Signed by: romein
GPG Key ID: 0EFF8478ADDF6C49

View File

@ -47,6 +47,10 @@ func (a *App) Menu() *menu.Menu {
if runtime.GOOS == "darwin" { if runtime.GOOS == "darwin" {
appMenu.Append(menu.EditMenu()) appMenu.Append(menu.EditMenu())
windowMenu := appMenu.AddSubmenu("Window")
windowMenu.AddText("Minimize", keys.CmdOrCtrl("M"), func(cd *menu.CallbackData) { wailsRuntime.WindowMinimise(a.ctx) })
windowMenu.AddText("Hide", keys.CmdOrCtrl("H"), func(cd *menu.CallbackData) { wailsRuntime.WindowMinimise(a.ctx) })
} }
helpMenu := appMenu.AddSubmenu("Help") helpMenu := appMenu.AddSubmenu("Help")