Tweaked text box scrolling
This commit is contained in:
parent
89881247d0
commit
b69eb6b62e
@ -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 {
|
||||
|
Reference in New Issue
Block a user