gpui-component/crates
Nico Gründel 5de9a24654
resizable: Improve to avoid panels from improperly resizing on container resizing. (#1560)
This pull request changes the internal behavior of the resizable panel
to get rid of some weird behavior with many panels and resizing.

Previously, when having multiple panels and dragging them into each
other, panels that shouldn't be affected got improperly resized:


https://github.com/user-attachments/assets/20d280c0-8a51-4e96-9c4a-3ade3deaca02

This pull request completely fixes this behavior:


https://github.com/user-attachments/assets/7c207dd8-d0a0-47d3-8d9e-c7127f43fa73

In addition, dragging the container smaller and larger again wasn't
idempotent:


https://github.com/user-attachments/assets/ca54b039-fd79-4fa8-87cf-590c06dd2c18

This is also fixed by this pull request, replacing the behavior with
more intuitive behavior, keeping the fractional size of all panels
constant:


https://github.com/user-attachments/assets/365d0a99-fd4b-4948-bc1b-bafdd826394a


https://github.com/user-attachments/assets/b208b34f-18e7-42a4-825a-9dad421b7ad3

If desired, it would also be easy to only change the size of the panels
that don't have a default size set when the container changes size.

---------

Co-authored-by: Jason Lee <huacnlee@gmail.com>
2025-11-12 21:18:05 +08:00
..
macros Bump v0.4.0-preview2 2025-11-12 15:16:49 +08:00
reqwest_client Bump v0.4.0-preview2 2025-11-12 15:16:49 +08:00
story root: Fix Root use text size may override default text color. (#1576) 2025-11-12 19:05:30 +08:00
ui resizable: Improve to avoid panels from improperly resizing on container resizing. (#1560) 2025-11-12 21:18:05 +08:00