forked from joejulian/gio
app: [Windows] show the maximize button even when MaxSize is set
According to @kkeybbs, pressing the maximize button on Windows only resizes the window up to its maximum bounds. That means we can leave the button available, and only hide it when the window has a fixed size. Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
+3
-6
@@ -759,13 +759,10 @@ func (w *window) Configure(options []Option) {
|
||||
showMode = windows.SW_SHOWMAXIMIZED
|
||||
}
|
||||
|
||||
// Disable maximize button if MaxSize is set.
|
||||
if cnf.MaxSize != (image.Point{X: 0, Y: 0}) {
|
||||
// Disable window resizing if MinSize and MaxSize are equal.
|
||||
if cnf.MaxSize != (image.Point{}) && cnf.MinSize == cnf.MaxSize {
|
||||
style &^= windows.WS_MAXIMIZEBOX
|
||||
// Disable window resizing if MinSize and MaxSize are equal.
|
||||
if cnf.MinSize == cnf.MaxSize {
|
||||
style &^= windows.WS_THICKFRAME
|
||||
}
|
||||
style &^= windows.WS_THICKFRAME
|
||||
}
|
||||
|
||||
// Note: these invocation all trigger the windows callback method which may process a pending system.ActionCenter
|
||||
|
||||
Reference in New Issue
Block a user