widget/material: update Decorations

Fix actions not processed and move the Layout method from
Decorations to DecorationsStyle.

Also clarify the comment for the app.Window.Decorated option.

Signed-off-by: Pierre Curto <pierre.curto@gmail.com>
This commit is contained in:
Pierre Curto
2022-01-28 09:56:20 +01:00
committed by Elias Naur
parent 5ce1e98282
commit 030fd8a171
3 changed files with 58 additions and 58 deletions
+4 -4
View File
@@ -1068,11 +1068,11 @@ func (w *window) resize(a system.Action) {
case system.ActionResizeNorthWest:
edge = C.XDG_TOPLEVEL_RESIZE_EDGE_TOP_LEFT
case system.ActionResizeNorthEast:
edge = C.XDG_TOPLEVEL_RESIZE_EDGE_BOTTOM_LEFT
edge = C.XDG_TOPLEVEL_RESIZE_EDGE_TOP_RIGHT
case system.ActionResizeSouthEast:
edge = C.XDG_TOPLEVEL_RESIZE_EDGE_BOTTOM_RIGHT
case system.ActionResizeSouthWest:
edge = C.XDG_TOPLEVEL_RESIZE_EDGE_TOP_RIGHT
edge = C.XDG_TOPLEVEL_RESIZE_EDGE_BOTTOM_LEFT
default:
return
}
@@ -1115,9 +1115,9 @@ func (w *window) SetCursor(name pointer.CursorName) {
case pointer.CursorTopLeftResize:
name = "top_left_corner"
case pointer.CursorTopRightResize:
name = "bottom_left_corner"
case pointer.CursorBottomLeftResize:
name = "top_right_corner"
case pointer.CursorBottomLeftResize:
name = "bottom_left_corner"
case pointer.CursorBottomRightResize:
name = "bottom_right_corner"
case pointer.CursorLeftResize: