-
Notifications
You must be signed in to change notification settings - Fork 25
Fix scrollbar jitter and not appearing when they should #55
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Fix scrollbar jitter and not appearing when they should #55
Conversation
mstv
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
works well for me; nitpicks on code style (ignoring usage of var because commonly used for this control)
|
Thank you @mstv for the review 👍 I've made the changes except for where I still would prefer to have it the way it is.. although that's not the hill I am ready to die on :D so let me know if you have strong views on those. |
Fixes #4 and #53
Root cause for #4 only occurs when using a mouse cursor to drag the vertical scrollbar. If during drag a horizontal scrollbar is shown or hidden the text part of
TextAreaControlgets resized by the appearance or disappearance of the scrollbar at the bottom. At the same time mouse cursor which drags the vertical scrollbar remains in the same place (adjusted for the dragging itself). This causes the vertical scrollbar to effectively get moved as the whole control "moves" under it while dragging is active.Notepad++solves this by keeping the horizontal scrollbar forever if it's shown at least once.Note
This only applies to click+drag scrolling. Scroll-wheel or touch-pad scrolling is not affected
#53 was caused by being unable to reach a "stable" state when trying to determine necessary scrollbars. e.g. 1) you need a horizontal scrollbar 2) horizontal scrollbar hides the longest line which caused it 3) hide horizontal scrollbar .. back to 1).
Proposed changes
TrackableVScrollBar)Test methodology
Merge strategy
I agree that the maintainer squash merge this PR (if the commit message is clear).