5
0
mirror of https://github.com/wailsapp/wails.git synced 2025-05-03 06:01:52 +08:00

Allow window resizing regardless of frameless or other options

Fix bug on Windows where the disableResize option depends on the frameless option.
This commit is contained in:
Pierre Joye 2021-12-30 16:55:47 +07:00 committed by GitHub
parent c16bb9715f
commit e9aba4795f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -57,10 +57,10 @@ func NewWindow(parent winc.Controller, appoptions *options.App) *Window {
result.SetText(appoptions.Title) result.SetText(appoptions.Title)
if appoptions.Frameless == false && !appoptions.Fullscreen { if appoptions.Frameless == false && !appoptions.Fullscreen {
result.EnableMaxButton(!appoptions.DisableResize) result.EnableMaxButton(!appoptions.DisableResize)
result.EnableSizable(!appoptions.DisableResize)
result.SetMinSize(appoptions.MinWidth, appoptions.MinHeight) result.SetMinSize(appoptions.MinWidth, appoptions.MinHeight)
result.SetMaxSize(appoptions.MaxWidth, appoptions.MaxHeight) result.SetMaxSize(appoptions.MaxWidth, appoptions.MaxHeight)
} }
result.EnableSizable(!appoptions.DisableResize)
if appoptions.Windows != nil { if appoptions.Windows != nil {
if appoptions.Windows.WindowIsTranslucent { if appoptions.Windows.WindowIsTranslucent {