mirror of
https://github.com/wailsapp/wails.git
synced 2026-03-14 22:55:48 +01:00
Add menu option for Linux
This commit is contained in:
parent
36a1b71f93
commit
2db902ef82
2 changed files with 4 additions and 3 deletions
|
|
@ -28,7 +28,6 @@ type linuxWebviewWindow struct {
|
|||
parent *WebviewWindow
|
||||
menubar pointer
|
||||
vbox pointer
|
||||
menu *Menu
|
||||
accels pointer
|
||||
lastWidth int
|
||||
lastHeight int
|
||||
|
|
@ -261,12 +260,11 @@ func (w *linuxWebviewWindow) run() {
|
|||
|
||||
app := getNativeApplication()
|
||||
|
||||
var menu = w.menu
|
||||
var menu = w.parent.options.Linux.Menu
|
||||
if menu != nil {
|
||||
InvokeSync(func() {
|
||||
menu.Update()
|
||||
})
|
||||
w.menu = menu
|
||||
w.gtkmenu = (menu.impl).(*linuxMenu).native
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -530,4 +530,7 @@ type LinuxWindow struct {
|
|||
|
||||
// WindowDidMoveDebounceMS is the debounce time in milliseconds for the WindowDidMove event
|
||||
WindowDidMoveDebounceMS uint16
|
||||
|
||||
// Menu is the window's menu
|
||||
Menu *Menu
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue