mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-01 07:35:40 +00:00
layout: don't force Expanded Stack children larger than their minimum
Instead, honor the constraints after laying out both Stacked and Expanded children. Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
+1
-1
@@ -69,7 +69,6 @@ func (s Stack) Layout(gtx *Context, children ...StackChild) {
|
||||
children[i].macro = m
|
||||
children[i].dims = dims
|
||||
}
|
||||
maxSZ = gtx.Constraints.Constrain(maxSZ)
|
||||
// Then lay out Expanded children.
|
||||
for i, w := range children {
|
||||
if !w.expanded {
|
||||
@@ -93,6 +92,7 @@ func (s Stack) Layout(gtx *Context, children ...StackChild) {
|
||||
children[i].dims = dims
|
||||
}
|
||||
|
||||
maxSZ = gtx.Constraints.Constrain(maxSZ)
|
||||
var baseline int
|
||||
for _, ch := range children {
|
||||
sz := ch.dims.Size
|
||||
|
||||
Reference in New Issue
Block a user