mirror of
https://github.com/wailsapp/wails.git
synced 2025-05-02 08:10:56 +08:00
[windows] Fix bug with windows options
This commit is contained in:
parent
9a99b47f07
commit
2c2ce66ec4
@ -23,9 +23,12 @@ func NewWindow(parent winc.Controller, options *options.App) *Window {
|
||||
result.frontendOptions = options
|
||||
result.SetIsForm(true)
|
||||
|
||||
exStyle := w32.WS_EX_CONTROLPARENT | w32.WS_EX_APPWINDOW
|
||||
if options.Windows.WindowBackgroundIsTranslucent {
|
||||
exStyle |= w32.WS_EX_NOREDIRECTIONBITMAP
|
||||
var exStyle int
|
||||
if options.Windows != nil {
|
||||
exStyle = w32.WS_EX_CONTROLPARENT | w32.WS_EX_APPWINDOW
|
||||
if options.Windows.WindowBackgroundIsTranslucent {
|
||||
exStyle |= w32.WS_EX_NOREDIRECTIONBITMAP
|
||||
}
|
||||
}
|
||||
|
||||
var dwStyle = w32.WS_OVERLAPPEDWINDOW
|
||||
@ -54,12 +57,14 @@ func NewWindow(parent winc.Controller, options *options.App) *Window {
|
||||
|
||||
result.SetFont(winc.DefaultFont)
|
||||
|
||||
if options.Windows.WindowBackgroundIsTranslucent {
|
||||
result.SetTranslucentBackground()
|
||||
}
|
||||
if options.Windows != nil {
|
||||
if options.Windows.WindowBackgroundIsTranslucent {
|
||||
result.SetTranslucentBackground()
|
||||
}
|
||||
|
||||
if options.Windows.DisableWindowIcon {
|
||||
result.DisableIcon()
|
||||
if options.Windows.DisableWindowIcon {
|
||||
result.DisableIcon()
|
||||
}
|
||||
}
|
||||
|
||||
if options.Fullscreen {
|
||||
|
@ -2,20 +2,13 @@ package options
|
||||
|
||||
import (
|
||||
"github.com/wailsapp/wails/v2/pkg/logger"
|
||||
"github.com/wailsapp/wails/v2/pkg/options/mac"
|
||||
)
|
||||
|
||||
// Default options for creating the App
|
||||
var Default = &App{
|
||||
Width: 1024,
|
||||
Height: 768,
|
||||
RGBA: 0xFFFFFFFF,
|
||||
Mac: &mac.Options{
|
||||
TitleBar: mac.TitleBarDefault(),
|
||||
Appearance: mac.DefaultAppearance,
|
||||
WebviewIsTransparent: false,
|
||||
WindowBackgroundIsTranslucent: false,
|
||||
},
|
||||
Width: 1024,
|
||||
Height: 768,
|
||||
RGBA: 0xFFFFFFFF,
|
||||
Logger: logger.NewDefaultLogger(),
|
||||
LogLevel: logger.INFO,
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user