mirror of
https://github.com/wailsapp/wails.git
synced 2026-03-14 14:45:49 +01:00
Revert systray-custom example changes
This commit is contained in:
parent
91c9c3f147
commit
dc662b561a
1 changed files with 2 additions and 9 deletions
|
|
@ -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()
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue