-
Notifications
You must be signed in to change notification settings - Fork 46
Fix scrolling problem with Qt native scrollbar #205
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
Conversation
So the |
I think that using the https://github.com/enthought/pyface/blob/master/pyface/ui/qt4/util/modal_dialog_tester.py on should be able to verify that the scrobars have the right value. |
@jwiggins In the case I'm looking at, the value is coming from a Nevertheless, I've pulled the computation out into something re-usable and hopefully clearer. |
Hrm... this probably isn't right if |
Added a test and corrected for non-zero min values. I think that this is ready to merge. |
Thanks Corran! I'll take a look later during the inevitable Travis pauses. |
Hrmmm... need to skip the new test when running under wx. |
enable/tests/qt4/scrollbar_test.py
Outdated
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.
enable_range
and value
are being ignored here.
I think it might still fail when it actually runs the tests. You should look at the previous run with Qt. |
Hmmm... yes, looks like the window isn't being created, but the tests are running fine on my machine. Not sure what's going on. |
A bit more digging, it looks like |
Sounds good. Once Travis is satisfied, I'm ready to merge this. |
With fixes for unexpected success from master, the tests are now passing, so I think this is good. |
LGTM! |
Fix scrolling problem with Qt native scrollbar
Scrolling was in the reverse direction for vertical scrollbars (ie. when scrollbar was at top, view was at bottom and vice-versa). This fixes this issue.
Testing is difficult for this - have just spent an unproductive hour trying to get something working. We probably want a little set of utility routines. I'll leave it up to the PR reviewer as to whether we should try to add tests before merging.