From 36919ef756c621bae9a5dd6188c91e9f4d147a93 Mon Sep 17 00:00:00 2001 From: Elias Naur Date: Sat, 2 Apr 2022 15:46:27 +0200 Subject: [PATCH] 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 --- layout/list.go | 6 ------ 1 file changed, 6 deletions(-) diff --git a/layout/list.go b/layout/list.go index 39f72db2..b56922d6 100644 --- a/layout/list.go +++ b/layout/list.go @@ -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.