mirror of
https://github.com/wailsapp/wails.git
synced 2025-05-02 19:50:15 +08:00
[v2] Only call EnableSizable for normal windows
Frameless windows are always not resizable per default and the resizing for those will be initiated by the frontend see processMessage. If EnableSizable is enabled for frameless windows, a small white titlebar will be shown. Fix #1049
This commit is contained in:
parent
72a0936f49
commit
c4b14740d5
@ -55,12 +55,17 @@ func NewWindow(parent winc.Controller, appoptions *options.App) *Window {
|
|||||||
|
|
||||||
result.SetSize(appoptions.Width, appoptions.Height)
|
result.SetSize(appoptions.Width, appoptions.Height)
|
||||||
result.SetText(appoptions.Title)
|
result.SetText(appoptions.Title)
|
||||||
if appoptions.Frameless == false && !appoptions.Fullscreen {
|
if appoptions.Frameless == false {
|
||||||
result.EnableMaxButton(!appoptions.DisableResize)
|
if !appoptions.Fullscreen {
|
||||||
result.SetMinSize(appoptions.MinWidth, appoptions.MinHeight)
|
result.EnableMaxButton(!appoptions.DisableResize)
|
||||||
result.SetMaxSize(appoptions.MaxWidth, appoptions.MaxHeight)
|
result.SetMinSize(appoptions.MinWidth, appoptions.MinHeight)
|
||||||
|
result.SetMaxSize(appoptions.MaxWidth, appoptions.MaxHeight)
|
||||||
|
}
|
||||||
|
// Only call EnableSizable for normal windows, frameless windows are always not resizable per default and
|
||||||
|
// the resizing for those will be initiated by the frontend see processMessage.
|
||||||
|
// If EnableSizable is enabled for frameless windows, a small white titlebar will be shown.
|
||||||
|
result.EnableSizable(!appoptions.DisableResize)
|
||||||
}
|
}
|
||||||
result.EnableSizable(!appoptions.DisableResize)
|
|
||||||
|
|
||||||
if appoptions.Windows != nil {
|
if appoptions.Windows != nil {
|
||||||
if appoptions.Windows.WindowIsTranslucent {
|
if appoptions.Windows.WindowIsTranslucent {
|
||||||
|
Loading…
Reference in New Issue
Block a user