-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Support scaling around center when scaling with select box #29949
Conversation
…dragging select box handle
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.
Because this is yet another key modifier specific interaction, I'd love to see test coverage for this. Probably the sort that also covers the pre-existing Shift behaviour. And probably a test that covers using both Shift and this simultaneously.
@@ -50,14 +50,14 @@ protected override void OnDrag(DragEvent e) | |||
|
|||
rawScale = convertDragEventToScaleMultiplier(e); | |||
|
|||
applyScale(shouldLockAspectRatio: isCornerAnchor(originalAnchor) && e.ShiftPressed); | |||
applyScale(shouldLockAspectRatio: isCornerAnchor(originalAnchor) && e.ShiftPressed, ignoreAnchor: e.AltPressed); |
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.
Alt is not the conventional choice for this behaviour. In gimp this is under Ctrl. And I believe it's the same in photoshop (although I don't have a copy to check right now).
I'd probably prefer this was Ctrl. Is there a particular reason for choosing Alt?
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.
I used Alt
because from my experience it is the typical modifier key used for this (photoshop, figma, indesign, krita all use the Alt
key), but after some research I found some programs that use Ctrl
too (affinity photo, microsoft word), so I'm open to change it. Alt
is definitely the first key I tried out when I was originally looking for this feature though.
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.
Oh figma does use Alt... interesting.
I did test https://www.photopea.com/ which is a sort of photoshop clone and that used Ctrl so I extrapolated photoshop did the same, although possibly too rashly.
I'm not sure I'm hugely fussed as to which one it is in the end, but it'd be good to know if one is more frequently used than the other...
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.
I can compile a list of what modifier is used for different programs, however I'm a bit unsure which programs to check here since the original list already includes pretty much every program that I could think of off the top of my head (apart from checking the entire adobe/affinity suite I guess).
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.
Nah it's fine. I'm ok with just going with alt for now. If figma and adobe use that then that's probably the one users will most expect.
osu.Game/Screens/Edit/Compose/Components/SelectionBoxScaleHandle.cs
Outdated
Show resolved
Hide resolved
…maintain aspect ratio
Will scale around the center when pressing alt while scaling things with the select box.
Had to move the event handling for toggling the distance snap grid to
(Osu/Catch)HitObjectComposer
so the event could be prevented by the scale handle, but sinceOsuHitObjectComposer
already handles the grid snap toggle this should hopefully be fine.2024-09-21.14-18-19.mp4
2024-09-21.14-23-38.mp4