From aaed7a59f7e537949c0a9d630a7b97950830a44a Mon Sep 17 00:00:00 2001 From: Romein van Buren Date: Sat, 24 Jun 2023 22:10:25 +0200 Subject: [PATCH] Add window menu for Mac --- internal/app/app_menu.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/internal/app/app_menu.go b/internal/app/app_menu.go index f345340..f9d57ce 100644 --- a/internal/app/app_menu.go +++ b/internal/app/app_menu.go @@ -47,6 +47,10 @@ func (a *App) Menu() *menu.Menu { if runtime.GOOS == "darwin" { 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")