forked from joejulian/gio
layout: don't clip List children
Clipping all children once to the entire List area is enough. The change was motivated by #389 where individual child clips would make it harder for focus scroll heuristics to work. References: https://todo.sr.ht/~eliasnaur/gio/389 Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
@@ -289,16 +289,10 @@ func (l *List) layout(ops *op.Ops, macro op.MacroOp) Dimensions {
|
|||||||
if min < 0 {
|
if min < 0 {
|
||||||
min = 0
|
min = 0
|
||||||
}
|
}
|
||||||
r := image.Rectangle{
|
|
||||||
Min: l.Axis.Convert(image.Pt(min, -inf)),
|
|
||||||
Max: l.Axis.Convert(image.Pt(max, inf)),
|
|
||||||
}
|
|
||||||
cl := clip.Rect(r).Push(ops)
|
|
||||||
pt := l.Axis.Convert(image.Pt(pos, cross))
|
pt := l.Axis.Convert(image.Pt(pos, cross))
|
||||||
trans := op.Offset(FPt(pt)).Push(ops)
|
trans := op.Offset(FPt(pt)).Push(ops)
|
||||||
child.call.Add(ops)
|
child.call.Add(ops)
|
||||||
trans.Pop()
|
trans.Pop()
|
||||||
cl.Pop()
|
|
||||||
pos += childSize
|
pos += childSize
|
||||||
}
|
}
|
||||||
// Lay out leading invisible child.
|
// Lay out leading invisible child.
|
||||||
|
|||||||
Reference in New Issue
Block a user