Fix image button panicking with tiny `available_space` (#6900)

* Fixes <https://github.com/emilk/egui/issues/6772>
* [x] I have followed the instructions in the PR template
This commit is contained in:
Lucas Meurer 2025-04-30 10:40:50 +02:00 committed by GitHub
parent 1ab3259008
commit fdaac16e4a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -249,7 +249,7 @@ impl Widget for Button<'_> {
)
} else {
(
ui.available_size() - 2.0 * button_padding,
(ui.available_size() - 2.0 * button_padding).at_least(Vec2::ZERO),
default_font_height(),
)
};