Skip to content

Add Ui::take_available_space() helper function, which sets the Ui's minimum size to the available space#7573

Merged
IsseW merged 2 commits intomainfrom
isse/take-available-space-function
Oct 1, 2025
Merged

Add Ui::take_available_space() helper function, which sets the Ui's minimum size to the available space#7573
IsseW merged 2 commits intomainfrom
isse/take-available-space-function

Conversation

@IsseW
Copy link
Copy Markdown
Collaborator

@IsseW IsseW commented Sep 30, 2025

A shorthand, and more descriptive version of calling ui.set_min_size(ui.available_size()), and mentions this on panel's resizable functions.

@IsseW IsseW added docs and examples Improving and adding documentation and examples egui dev-experience labels Sep 30, 2025
@github-actions
Copy link
Copy Markdown

Preview available at https://egui-pr-preview.github.io/pr/7573-issetake-available-space-function
Note that it might take a couple seconds for the update to show up after the preview_build workflow has completed.

Copy link
Copy Markdown
Collaborator

@lucasmerlin lucasmerlin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome! I think it'd be nice to also add a take_available_width and take_available_height

@IsseW IsseW merged commit 0888e3d into main Oct 1, 2025
47 checks passed
@IsseW IsseW deleted the isse/take-available-space-function branch October 1, 2025 12:39
Masterchef365 pushed a commit to Masterchef365/egui that referenced this pull request Apr 3, 2026
… minimum size to the available space (emilk#7573)

A shorthand, and more descriptive version of calling
`ui.set_min_size(ui.available_size())`, and mentions this on panel's
resizable functions.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dev-experience docs and examples Improving and adding documentation and examples egui

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants