Add translucency effects

This commit is contained in:
Lea Anthony 2022-10-11 21:34:54 +11:00
commit 72a0db3938
No known key found for this signature in database
GPG key ID: 33DAF7BB90A58405
2 changed files with 8 additions and 1 deletions

View file

@ -6,7 +6,7 @@
<title>Systray Example</title>
<style>
html {
background-color: rgba(27, 38, 54, 1);
background-color: rgba(27, 38, 54, 0.75);
text-align: center;
color: white;
}

View file

@ -7,6 +7,7 @@ import (
"github.com/wailsapp/wails/v2/pkg/application"
"github.com/wailsapp/wails/v2/pkg/menu"
"github.com/wailsapp/wails/v2/pkg/options"
"github.com/wailsapp/wails/v2/pkg/options/windows"
"github.com/wailsapp/wails/v2/pkg/runtime"
)
@ -31,6 +32,12 @@ func main() {
OnStartup: func(ctx context.Context) {
runtimeContext = ctx
},
Windows: &windows.Options{
BackdropType: windows.Acrylic,
WindowIsTranslucent: true,
WebviewIsTransparent: true,
DisableWindowIcon: true,
},
})
// ------------------------------------