5
0
mirror of https://github.com/wailsapp/wails.git synced 2025-05-03 21:43:19 +08:00

Revert systray-custom example changes

This commit is contained in:
Ian VanSchooten 2025-03-06 13:58:32 -05:00 committed by Lea Anthony
parent 91c9c3f147
commit dc662b561a
No known key found for this signature in database
GPG Key ID: 33DAF7BB90A58405

View File

@ -2,12 +2,11 @@ package main
import (
_ "embed"
"log"
"runtime"
"github.com/wailsapp/wails/v3/pkg/application"
"github.com/wailsapp/wails/v3/pkg/events"
"github.com/wailsapp/wails/v3/pkg/icons"
"log"
"runtime"
)
var windowShowing bool
@ -53,12 +52,6 @@ func main() {
systemTray := app.NewSystemTray()
menu := app.NewMenu()
// Hidden menu item that can be unhidden
hidden := menu.Add("I was hidden").SetHidden(true)
menu.Add("Toggle the hidden menu").OnClick(func(ctx *application.Context) {
hidden.SetHidden(!hidden.Hidden())
menu.Update()
})
menu.Add("Quit").OnClick(func(data *application.Context) {
app.Quit()
})