Skip to content

Commit

Permalink
feat: update &options.App
Browse files Browse the repository at this point in the history
  • Loading branch information
misitebao committed Nov 20, 2022
1 parent 4903a40 commit 5230c7f
Showing 1 changed file with 6 additions and 22 deletions.
28 changes: 6 additions & 22 deletions main.tmpl.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"github.com/wailsapp/wails/v2"
"github.com/wailsapp/wails/v2/pkg/logger"
"github.com/wailsapp/wails/v2/pkg/options"
"github.com/wailsapp/wails/v2/pkg/options/assetserver"
"github.com/wailsapp/wails/v2/pkg/options/linux"
"github.com/wailsapp/wails/v2/pkg/options/mac"
"github.com/wailsapp/wails/v2/pkg/options/windows"
Expand Down Expand Up @@ -39,7 +40,6 @@ func main() {
StartHidden: false,
HideWindowOnClose: false,
BackgroundColour: &options.RGBA{R: 255, G: 255, B: 255, A: 0},
Assets: assets,
Menu: nil,
Logger: nil,
LogLevel: logger.DEBUG,
Expand All @@ -48,6 +48,11 @@ func main() {
OnBeforeClose: app.beforeClose,
OnShutdown: app.shutdown,
WindowStartState: options.Normal,
AssetServer: &assetserver.Options{
Assets: assets,
Handler: nil,
Middleware: nil,
},
Bind: []interface{}{
app,
},
Expand All @@ -61,27 +66,6 @@ func main() {
WebviewUserDataPath: "",
WebviewBrowserPath: "",
Theme: windows.SystemDefault,
CustomTheme: &windows.ThemeSettings{
DarkModeTitleBar: windows.RGB(20, 20, 20),
DarkModeTitleText: windows.RGB(200, 200, 200),
DarkModeBorder: windows.RGB(20, 0, 20),
LightModeTitleBar: windows.RGB(200, 200, 200),
LightModeTitleText: windows.RGB(20, 20, 20),
LightModeBorder: windows.RGB(200, 200, 200),
},
// User messages that can be customised
// Messages: &windows.Messages{
// InstallationRequired: "",
// UpdateRequired: "",
// MissingRequirements: "",
// Webview2NotInstalled: "",
// Error: "",
// FailedToInstall: "",
// DownloadPage: "",
// PressOKToInstall: "",
// ContactAdmin: "",
// InvalidFixedWebview2: "",
// },
},
// Mac platform specific options
// Mac平台特定选项
Expand Down

0 comments on commit 5230c7f

Please sign in to comment.