mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-07 18:35:34 +00:00
ui/layout: don't stretch Align child
Let the caller decide whether the constraints should be stretched. Also unexport Constraint (not Constraints) methods, they weren't pulling their weight. Finally, don't force cross axis constraint minimum to 0 in List. Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
+1
-4
@@ -217,11 +217,8 @@ func (l *List) Layout() Dimens {
|
||||
|
||||
func (l *List) crossConstraintChild(cs Constraints) Constraint {
|
||||
c := axisCrossConstraint(l.Axis, cs)
|
||||
switch l.CrossAxisAlignment {
|
||||
case Stretch:
|
||||
if l.CrossAxisAlignment == Stretch {
|
||||
c.Min = c.Max
|
||||
default:
|
||||
c.Min = 0
|
||||
}
|
||||
return c
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user