mirror of
https://github.com/wailsapp/wails.git
synced 2025-05-04 23:41:38 +08:00

* Expose `DefaultApplicationMenu`. Add `FindByLabel` and `ItemAt` for finding menu items in a menu * Add `Menu.RemoveMenuItem()`, `MneuItem.GetAccelerator()` and `MenuItem.RemoveAccelerator()` * Remove `Update` * Iterate when removing menu items * Add `GetSubmenu()`
15 lines
339 B
Go
15 lines
339 B
Go
//go:build !production || devtools
|
|
|
|
package application
|
|
|
|
func newOpenDevToolsMenuItem() *MenuItem {
|
|
return NewMenuItem("Open Developer Tools").
|
|
SetAccelerator("Alt+Command+I").
|
|
OnClick(func(ctx *Context) {
|
|
currentWindow := globalApplication.CurrentWindow()
|
|
if currentWindow != nil {
|
|
currentWindow.OpenDevTools()
|
|
}
|
|
})
|
|
}
|