From 0eb7a8a771bad3dd208b44bff3e3d48f0438bf79 Mon Sep 17 00:00:00 2001 From: Lea Anthony Date: Mon, 8 Nov 2021 07:00:01 +1100 Subject: [PATCH] [v2] Update svelte template --- .../templates/svelte/frontend/src/global.css | 2 +- .../templates/templates/svelte/main.tmpl.go | 18 +++++++++++++++++- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/v2/cmd/wails/internal/commands/initialise/templates/templates/svelte/frontend/src/global.css b/v2/cmd/wails/internal/commands/initialise/templates/templates/svelte/frontend/src/global.css index 3827664c..3bd7b1f1 100644 --- a/v2/cmd/wails/internal/commands/initialise/templates/templates/svelte/frontend/src/global.css +++ b/v2/cmd/wails/internal/commands/initialise/templates/templates/svelte/frontend/src/global.css @@ -2,7 +2,7 @@ html { text-align: center; color: white; - background-color: rgba(0, 0, 0, 255); + background-color: rgba(0, 0, 0, 0); width: 100%; height: 100%; } diff --git a/v2/cmd/wails/internal/commands/initialise/templates/templates/svelte/main.tmpl.go b/v2/cmd/wails/internal/commands/initialise/templates/templates/svelte/main.tmpl.go index 89a4cecb..71e2fd21 100644 --- a/v2/cmd/wails/internal/commands/initialise/templates/templates/svelte/main.tmpl.go +++ b/v2/cmd/wails/internal/commands/initialise/templates/templates/svelte/main.tmpl.go @@ -4,6 +4,8 @@ import ( "embed" "log" + "github.com/wailsapp/wails/v2/pkg/options/mac" + "github.com/wailsapp/wails/v2" "github.com/wailsapp/wails/v2/pkg/logger" "github.com/wailsapp/wails/v2/pkg/options" @@ -13,6 +15,9 @@ import ( //go:embed frontend/dist var assets embed.FS +//go:embed build/appicon.png +var icon []byte + func main() { // Create an instance of the app structure app := NewApp() @@ -31,7 +36,7 @@ func main() { Frameless: false, StartHidden: false, HideWindowOnClose: false, - RGBA: &options.RGBA{R: 255, G: 255, B: 255, A: 255}, + RGBA: &options.RGBA{R: 0, G: 0, B: 0, A: 0}, Assets: assets, LogLevel: logger.DEBUG, OnStartup: app.startup, @@ -46,6 +51,17 @@ func main() { WindowIsTranslucent: false, DisableWindowIcon: false, }, + Mac: &mac.Options{ + TitleBar: mac.TitleBarHiddenInset(), + Appearance: mac.NSAppearanceNameDarkAqua, + WebviewIsTransparent: true, + WindowIsTranslucent: true, + About: &mac.AboutInfo{ + Title: "My Application", + Message: "© 2021 Me", + Icon: icon, + }, + }, }) if err != nil {