mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-07 10:25:37 +00:00
ui/app: introduce Insets for system decoration insets
Insets is like image.Rectangle, but with properly named fields and ui.Value instead of raw ints to make use with the layout package easier. Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
+8
-4
@@ -19,16 +19,20 @@ type Event interface {
|
||||
type DrawEvent struct {
|
||||
Config Config
|
||||
Size image.Point
|
||||
// Insets is the window space taken up by
|
||||
// system decoration such as translucent
|
||||
// system bars and software keyboards.
|
||||
Insets image.Rectangle
|
||||
Insets Insets
|
||||
// Whether this draw is system generated
|
||||
// and needs a complete frame before
|
||||
// proceeding.
|
||||
sync bool
|
||||
}
|
||||
|
||||
// Insets is the space taken up by
|
||||
// system decoration such as translucent
|
||||
// system bars and software keyboards.
|
||||
type Insets struct {
|
||||
Top, Bottom, Left, Right ui.Value
|
||||
}
|
||||
|
||||
type StageEvent struct {
|
||||
Stage Stage
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user