Tweaked text box scrolling

This commit is contained in:
Sasha Koshka 2023-01-18 16:01:31 -05:00
parent 89881247d0
commit b69eb6b62e

View File

@ -244,7 +244,7 @@ func (element *TextBox) scrollToCursor () {
cursorPosition := element.valueDrawer.PositionOf(element.cursor)
cursorPosition.X -= element.scroll
maxX := bounds.Max.X
minX := bounds.Min.X + bounds.Dx() / 2
minX := maxX
if cursorPosition.X > maxX {
element.scroll += cursorPosition.X - maxX
} else if cursorPosition.X < minX {