Closed DSCaskey closed 3 days ago
Hello 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
preferencesgraphicsviewpage.cpp
and vcommonsettings.cpp
. Boosting Image Item Functionality
image_item.cpp
file has some vital modifications to enhance how we handle image items. It's now got a better handle on clearing selections and moving items around.Better Understanding With Comments
image_item.cpp
, vtoolspline.cpp
, vtoolsplinepath.cpp
, vtoolbasepoint.cpp
, pattern_piece_tool.cpp
, and vcontrolpointspline.cpp
. Splat! New Functions in vtoolsplinepath.cpp
vtoolsplinepath.cpp
file now has a heap of new functions to help us craft the optimal path for our splines and control visualization. It's like getting new superpowers! 💪Upkeeping our information
vgraphicsimpletextitem.cpp
and vmaingraphicsview.h
.On a Visible Mission
ensureRectVisible
function is here to make sure rectangles in our views never go undercover. Now everyone gets to see the amazing rectangles! 🟩Less Unused Code
vtoolsplinepath.cpp
file has helped us cut away some unused code. A easier and breezier file for everyone!Continue being spectacular! Remember, in this code universe, every star (or dev) counts! 🌟
I'm not sure why, but the "Autoscroll" font seems to be different from the one used for "show scrollbars". It's also the case in the screenshot you shared upper.
Mmmm, on my computer this PR creates huge freezes of the software when I use the middle mouse button to pan...
I'm not sure why, but the "Autoscroll" font seems to be different from the one used for "show scrollbars". It's also the case in the screenshot you shared upper.
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, buttons() & LeftButton
will be true if LeftButton is pressed, even if other buttons are also pressed at the same time whereas buttons() == LeftButton
will only be true if LeftButton is the only one pressed, which may be problematic since right clicking meanwhile moving an object would stop it from moving while the right click is pressed... 😊
If I'm not mistaken (I've not tested it), as a bitwise AND, buttons() & LeftButton will be true if LeftButton is pressed, even if other buttons are also pressed at the same time whereas buttons() == LeftButton
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. :)
If I'm not mistaken (I've not tested it), as a bitwise AND, buttons() & LeftButton will be true if LeftButton is pressed, even if other buttons are also pressed at the same time whereas buttons() == LeftButton
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.
1) New preferences.
2) Removes the behavior of auto scrolling by an object's bounding rect (+ margin) for all the tools that auto scroll.
3) Adds the auto scroll behavior to the image tool.
This closes issue #1152