ui: change area ops to use rectangles, not sizes

And then use the more general rectangles to add a buffer around
text.Editor click and scroll area.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2019-08-01 10:06:19 +02:00
parent d3df90887e
commit bfece0beba
5 changed files with 39 additions and 19 deletions
+1 -1
View File
@@ -243,7 +243,7 @@ func (l *List) Layout() Dimens {
}
dims := axisPoint(l.Axis, mainc.Constrain(pos), maxCross)
l.macro.Stop()
pointer.RectAreaOp{Size: dims}.Add(ops)
pointer.RectAreaOp{Rect: image.Rectangle{Max: dims}}.Add(ops)
l.scroll.Add(ops)
l.macro.Add(ops)
return Dimens{Size: dims}