mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-07 02:15:34 +00:00
ui/layout: drop CrossAxisAlignment value Stretch
It doesn't carry its own weight; client can just as easily adjust the Constraints themselves. Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
+1
-9
@@ -113,7 +113,7 @@ func (l *List) Index() int {
|
||||
|
||||
// Constraints is the constraints for the current element.
|
||||
func (l *List) Constraints() Constraints {
|
||||
return axisConstraints(l.Axis, Constraint{Max: ui.Inf}, l.crossConstraintChild(l.cs))
|
||||
return axisConstraints(l.Axis, Constraint{Max: ui.Inf}, axisCrossConstraint(l.Axis, l.cs))
|
||||
}
|
||||
|
||||
func (l *List) More() bool {
|
||||
@@ -243,11 +243,3 @@ func (l *List) Layout() Dimens {
|
||||
block.Add(ops)
|
||||
return Dimens{Size: dims}
|
||||
}
|
||||
|
||||
func (l *List) crossConstraintChild(cs Constraints) Constraint {
|
||||
c := axisCrossConstraint(l.Axis, cs)
|
||||
if l.CrossAxisAlignment == Stretch {
|
||||
c.Min = c.Max
|
||||
}
|
||||
return c
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user