mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-06 18:05:35 +00:00
layout: allow Expand children to fill the available area
Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
+2
-2
@@ -44,8 +44,8 @@ func (s *Stack) Expand(gtx *Context, w Widget) StackChild {
|
|||||||
var m op.MacroOp
|
var m op.MacroOp
|
||||||
m.Record(gtx.Ops)
|
m.Record(gtx.Ops)
|
||||||
cs := Constraints{
|
cs := Constraints{
|
||||||
Width: Constraint{Min: s.maxSZ.X, Max: s.maxSZ.X},
|
Width: Constraint{Min: s.maxSZ.X, Max: gtx.Constraints.Width.Max},
|
||||||
Height: Constraint{Min: s.maxSZ.Y, Max: s.maxSZ.Y},
|
Height: Constraint{Min: s.maxSZ.Y, Max: gtx.Constraints.Height.Max},
|
||||||
}
|
}
|
||||||
dims := gtx.Layout(cs, w)
|
dims := gtx.Layout(cs, w)
|
||||||
m.Stop()
|
m.Stop()
|
||||||
|
|||||||
Reference in New Issue
Block a user