UI: Improve how region size snapping respects the maximum size #109027

Merged
Julian Eisel merged 4 commits from JulianEisel/blender:temp-region-snap-maxsize into main 2023-07-03 13:06:45 +02:00

4 Commits

Author SHA1 Message Date
Julian Eisel 1144ac6f4c From review: Add comments 2023-07-03 13:04:33 +02:00
Julian Eisel b31c204a67 Merge branch 'main' into temp-region-snap-maxsize 2023-07-03 12:48:50 +02:00
Julian Eisel 676c02e33f Merge branch 'main' into temp-region-snap-maxsize 2023-06-27 08:15:51 +02:00
Julian Eisel b9b678e2b0 UI: Improve how region size snapping respects the maximum size
Previously, a region that used size snapping could be dragged to a
snapped size (say 3 times a column width), but then would be clamped to
an unsnapped size (say 2.7 times a column width) to make it fit the
available space.
Instead clamp the size before snapping, so that snapping respects the
available width/height (resulting in 2 times a column width for
example). Put differently, the region will not be made taller if there's
not enough space to fit the region up to the next snapping point.
2023-06-15 19:07:05 +02:00