mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-06 01:45:36 +00:00
widget: [API] change Decorations to leave the user in control of window state
As suggested by ~egonelbre, Decorations should not be the source of truth for the windows state, because external gestures may also change state. This breaking change removes Decorations.Perform and exposes Maximized as a bool which is the user's responsibility to set. Fixes: https://todo.sr.ht/~eliasnaur/gio/600 Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
@@ -75,7 +75,7 @@ func (d DecorationsStyle) layoutDecorations(gtx layout.Context) layout.Dimension
|
||||
case system.ActionMinimize:
|
||||
w = minimizeWindow
|
||||
case system.ActionMaximize:
|
||||
if d.Decorations.Maximized() {
|
||||
if d.Decorations.Maximized {
|
||||
w = maximizedWindow
|
||||
} else {
|
||||
w = maximizeWindow
|
||||
|
||||
Reference in New Issue
Block a user