Compare commits
2 Commits
2722d19ecd
...
84ab0895f8
Author | SHA1 | Date | |
---|---|---|---|
84ab0895f8 | |||
b9c77fd5f7 |
@ -200,6 +200,7 @@ func (this *ScrollContainer) handleKeyDown (key input.Key, numpad bool) bool {
|
|||||||
} else {
|
} else {
|
||||||
vector.Y -= this.PageSize().Y
|
vector.Y -= this.PageSize().Y
|
||||||
}
|
}
|
||||||
|
this.scrollBy(vector)
|
||||||
return true
|
return true
|
||||||
case input.KeyPageDown:
|
case input.KeyPageDown:
|
||||||
if modifiers.Shift {
|
if modifiers.Shift {
|
||||||
@ -207,6 +208,7 @@ func (this *ScrollContainer) handleKeyDown (key input.Key, numpad bool) bool {
|
|||||||
} else {
|
} else {
|
||||||
vector.Y += this.PageSize().Y
|
vector.Y += this.PageSize().Y
|
||||||
}
|
}
|
||||||
|
this.scrollBy(vector)
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
return false
|
return false
|
||||||
|
@ -22,6 +22,6 @@ func NewTextView (text string) *TextView {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (this *TextView) handleScroll (x, y float64) bool {
|
func (this *TextView) handleScroll (x, y float64) bool {
|
||||||
this.ScrollTo(this.ContentBounds().Min.Add(image.Pt(int(x), int(y))))
|
this.ScrollTo(this.ContentBounds().Min.Sub(image.Pt(int(x), int(y))))
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user