-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Allow resize on one both or no axis. #7047
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
base: main
Are you sure you want to change the base?
Conversation
…g checkboxes to control X/Y axis resizing. * Note: the original API accepted a `Vec2b`, but didn't use the x/y properties independently.
Here's a video of the Resize control in combination with a table, using taffy for layout: Recording.2025-05-13.091334.mp4This video also highlights a usability issue, where it's hard to resize a table due to the scrollbars. It's hard to find the resize handle; you have to hover around until you see the pointer change. not all of the visible area of the resize handle actually works for resizing. |
A nice cool improvement would be also to change the cursor to be only horizontal/vertical/diagonal based on the available x/y/x&y |
Preview available at https://egui-pr-preview.github.io/pr/7047-resize-improvements-1 |
if self.resizable.x { | ||
state.desired_size.x = user_requested_size.x; | ||
} | ||
if self.resizable.y { | ||
state.desired_size.y = user_requested_size.y; | ||
} |
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.
AFAICT this code path is only hit by Window
, which should already respect resizable
. Is this really changing any behavior in practice? Or is the PR just about demonstrating an existing behavior in the demo?
Vec2b
, but didn't use the x/y properties independently, thus this is a non-breaking change and should probably be considered a bug-fix.Video:
Recording.2025-05-12.211409.mp4