5
0
mirror of https://github.com/wailsapp/wails.git synced 2025-05-02 19:31:20 +08:00
This commit is contained in:
Lea Anthony 2025-04-19 13:49:02 +10:00
parent d3253eb3e4
commit 823f57cde5
No known key found for this signature in database
GPG Key ID: 33DAF7BB90A58405
2 changed files with 5 additions and 5 deletions

View File

@ -313,7 +313,7 @@ app.NewWebviewWindow().SetTitle("Window 2").Show()
### Application Menu Behaviour
When you set an application menu using `app.SetMenu()`, it becomes the main menu on macOS.
Menus are set on a pre-window basis for Windows/Linux (unless `UseGlobalMenuByDefault` is enabled).
Menus are set on a per-window basis for Windows/Linux (unless `UseGlobalMenuByDefault` is enabled).
```go
app.NewWebviewWindowWithOptions(application.WebviewWindowOptions{

View File

@ -14,13 +14,13 @@ var clickBitmap []byte
func main() {
app := application.New(application.Options{
UseGlobalMenuByDefault: true,
Name: "Menu Demo",
Description: "A demo of the menu system",
Assets: application.AlphaAssets,
Mac: application.MacOptions{
ApplicationShouldTerminateAfterLastWindowClosed: true,
},
UseGlobalMenuByDefault: true,
})
// Create a custom menu