mirror of
https://github.com/wailsapp/wails.git
synced 2025-05-21 11:29:29 +08:00
[v3 linux] allow menu setting on Linux
This commit is contained in:
parent
e942312c4c
commit
33e20cbc77
@ -2,7 +2,6 @@ package application
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"github.com/wailsapp/wails/v3/internal/capabilities"
|
|
||||||
"log"
|
"log"
|
||||||
"net/http"
|
"net/http"
|
||||||
"os"
|
"os"
|
||||||
@ -10,6 +9,8 @@ import (
|
|||||||
"strconv"
|
"strconv"
|
||||||
"sync"
|
"sync"
|
||||||
|
|
||||||
|
"github.com/wailsapp/wails/v3/internal/capabilities"
|
||||||
|
|
||||||
"github.com/wailsapp/wails/v3/pkg/icons"
|
"github.com/wailsapp/wails/v3/pkg/icons"
|
||||||
|
|
||||||
"github.com/samber/lo"
|
"github.com/samber/lo"
|
||||||
@ -414,7 +415,7 @@ func (a *App) Run() error {
|
|||||||
a.runLock.Unlock()
|
a.runLock.Unlock()
|
||||||
|
|
||||||
// set the application menu
|
// set the application menu
|
||||||
if runtime.GOOS == "darwin" {
|
if runtime.GOOS == "darwin" || runtime.GOOS == "linux" {
|
||||||
a.impl.setApplicationMenu(a.ApplicationMenu)
|
a.impl.setApplicationMenu(a.ApplicationMenu)
|
||||||
}
|
}
|
||||||
a.impl.setIcon(a.options.Icon)
|
a.impl.setIcon(a.options.Icon)
|
||||||
|
Loading…
Reference in New Issue
Block a user