Commit Graph

29 Commits

Author SHA1 Message Date
Bartłomiej Dach b92cbff81d
Merge branch 'master' into scale-with-no-axes-should-do-nothing 2024-10-15 14:20:24 +02:00
Bartłomiej Dach 634f20e8de
Ensure at least scale popover axis toggle is active at any time
As in, toggling off an axis if it is the only one enabled will enable
the other one in turn.

Co-authored-by: Dean Herbert <pe@ppy.sh>
2024-10-15 14:12:17 +02:00
Bartłomiej Dach 4e8e4a34bd
Fix scale popover doing things when both scale axes are turned off
Spotted in passing when reviewing https://github.com/ppy/osu/pull/30080.
The popover would very arbitrarily revert to scaling by Y axis if both
checkboxes were checked off.

Not sure how this passed review.
2024-10-11 15:18:43 +02:00
Bartłomiej Dach d1da1d4079
Rename methods to fit new changes better 2024-10-11 15:03:30 +02:00
OliBomby 0695d51968 Set minimum scale to 0.5 2024-10-01 16:48:55 +02:00
OliBomby 08e1698bb6 fix scale clamp computation and code cleanup 2024-10-01 16:45:39 +02:00
OliBomby 0677430975 compute lower bound in clamp scale 2024-10-01 16:45:27 +02:00
Bartłomiej Dach 86432078dd
Remove usage of switch expression syntax
It's not universally accepted here and a `when` crept in that can be
bypassed entirely using rather clean baseline language constructs, so
why bother at this point.
2024-09-24 11:53:02 +02:00
Marvin Schürz 8bca8d6072 Restore previous scale behavior when using scale popover 2024-09-20 17:38:49 +02:00
OliBomby a80e333786 add playfield origin as third origin option 2024-07-14 17:27:04 +02:00
OliBomby 9e5d099b1b rename playfield centre origin to grid centre 2024-07-14 17:13:22 +02:00
OliBomby 7a319a6d74 dont rotate scale when in selection origin mode 2024-07-14 17:03:17 +02:00
OliBomby d0715c5f12 scale along rotated axis 2024-07-03 16:23:19 +02:00
OliBomby 5f8512896e use grid origin in scale tool 2024-07-03 12:40:22 +02:00
Bartłomiej Dach 9bd4b0d613
Rename method 2024-05-29 10:04:51 +02:00
Bartłomiej Dach ba40737356
Simplify logic 2024-05-29 10:01:04 +02:00
Bartłomiej Dach 96a8bdf920
Use more generic tooltip copy 2024-05-29 09:59:19 +02:00
Bartłomiej Dach 4a8273b6ed
Rename another method 2024-05-29 09:43:09 +02:00
OliBomby 9a18ba2699 disable playfield centre origin when scaling slider and simplify logic 2024-05-28 18:27:01 +02:00
OliBomby 9548585b15 fix axis checkboxes being disabled in playfield origin scale 2024-05-28 17:24:31 +02:00
OliBomby d143a697d2 refactor CanScaleFromPlayfieldOrigin and GetClampedScale to derived class 2024-05-28 17:12:16 +02:00
OliBomby 7cdc755c16 Bind axis checkbox disabled state to CanScaleX/Y 2024-05-28 16:57:24 +02:00
OliBomby 8eb23f8a60 remove redundant CanScaleFromSelectionOrigin 2024-05-28 16:19:57 +02:00
OliBomby a89ba33b47 rename CanScaleSelectionOrigin/PlayfieldOrigin to make clear its not the origin being scaled 2024-05-28 16:14:16 +02:00
OliBomby d4489545f2 add axis toggles 2024-05-25 21:44:08 +02:00
OliBomby 37530eebcc Enable scale buttons at the correct times 2024-05-25 20:35:06 +02:00
OliBomby 4eeebdf60c calculate max scale bounds for scale slider 2024-05-25 20:17:27 +02:00
OliBomby 88314dc584 select all input text on popup for an easy typing experience 2024-05-25 18:41:31 +02:00
OliBomby 6aa92bcc45 Add simple scale tool 2024-05-25 18:31:19 +02:00