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