mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-01 07:35:40 +00:00
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 {
|
||||
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.
|
||||
|
||||
Reference in New Issue
Block a user