This patch adds smooth (line by line) scrolling for the text editor.
Scrolling starts at 4 lines away from the top/bottom edge.
It also adds a small padding to the top, so the ascenders aren't touching
the top of the editor.
Differential D1708
Add smooth scrolling to text editor Authored by Diego Gangl (januz) on Jan 5 2016, 1:04 AM.
Details
This patch adds smooth (line by line) scrolling for the text editor. It also adds a small padding to the top, so the ascenders aren't touching
Diff Detail
Event TimelineComment Actions tested the patch and it does not behave correct. Try going from the middle of screen to the top line of text using the mouse and then pres down key. Even tho cursor is being moved down, the text is scrolled upwards. Another issue with the patch is that it adds some runtime state to DNA which isn't really nice. Think it's relatively simple to avoid this by, probably, storing current line in the operator and perhaps passing it to a few utility functions. Other ideas could work here as well. Comment Actions Ahh forgot to test mouse scroll too, you're right. My first attempt was to make a new function but I ended up duplicating a lot of code. Adding a new parameter was tricky too, because almost all text ops go through text_update_cursor_moved. What do you mean by a few utility functions? Comment Actions
|