-
-
Notifications
You must be signed in to change notification settings - Fork 111
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
feature: add disable & speed control to auto scrolling #1159
Conversation
🚀 Pull Request SummaryHello amazing team, it's a great day for an update! Here is a quick rundown of the changes in our codebase. Remember, your hard work is like pixels on a screen, every bit contributes to the beautiful big picture! 🎨 Autoscroll Feature Enhancements
Boosting Image Item Functionality
Better Understanding With Comments
Splat! New Functions in
Upkeeping our information
On a Visible Mission
Less Unused Code
Continue being spectacular! Remember, in this code universe, every star (or dev) counts! 🌟 |
Mmmm, on my computer this PR creates huge freezes of the software when I use the middle mouse button to pan... |
Discovered another quirk in Creator. Here's the 2 checkboxes in Creator. If you look you will see that both are set to 9 point... but are they? Nope. Only the Show Scrollbars that displays Point Size in BOLD. Here's the quirky part... you can't just hit return in the Point Size field after the 9... you have to change it to something else.. THEN change it back to 9, at which point Point Size is then displayed in BOLD. The other quirky part is why does Creator display a size of 9, when in fact no font size is written in the ui form... it should display nothing you would thin? BTW... somewhere the default font size is set to 8 point. |
In image_item.cpp : If I'm not mistaken, as a bitwise AND, |
Look closer... it's button()... not buttons(). No "s". It does the same thing. I changed it to button() == Qt::LeftButton to be consistent with the rest of the code. In fact button() == Qt::LeftButton is used in resize_handle.cpp. I have no preference one way or the other - I can read either way... I just prefer it to be, one way or the other, not both. :) |
Oops, I didn't see the "s", I should have read this more carefully 😂 |
The commit that makes this out-of-date is just a link in the README to the Doxygen docs, you can merge it without risk. |
@DSCaskey I'm not sure if this is the best way to slow down the auto-scrolling. The issue using ensureRectVisible is that when you want the view to auto-scroll, you will put your mouse ouf of the screen, and it will jump to put back your mouse in the view, then wait a little bit and do it again: it's not smooth at all, it seems very very laggy. The auto-scrolling is a succession of sudden jumps... I think we have to modify this behavior so it's like in other softwares: we should not use the ensureVisible function but simply pan the view with a speed proportional to the distance between the cursor and the edge of the view. This way it will start auto-scrolling slowly but smoothly when the mouse is out of the view, and get quicker and quicker when the mouse is far away, but without jumping. 😊 |
In other words, I think we need to move the view 1 pixel at a time, faster and faster as the mouse is far away from the edge of the view. |
As this PR still needs some modifications to make the scrolling smooth, I'm putting it in Draft Mode so we can put it aside for a moment 😉 |
This PR does 2 main things. Gives an option to disable auto scrolling completely and adds a delay to control the speed of the auto scrolling.
Removes the behavior of auto scrolling by an object's bounding rect (+ margin) for all the tools that auto scroll.
Adds the auto scroll behavior to the image tool.
This closes issue #1152