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:
Elias Naur
2022-04-02 15:46:27 +02:00
parent a1b5ff059c
commit 36919ef756
-6
View File
@@ -289,16 +289,10 @@ func (l *List) layout(ops *op.Ops, macro op.MacroOp) Dimensions {
if 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))
trans := op.Offset(FPt(pt)).Push(ops)
child.call.Add(ops)
trans.Pop()
cl.Pop()
pos += childSize
}
// Lay out leading invisible child.