Skip to content

Commit

Permalink
Fix: Ui::new_child does not consider the sizing_pass field of `UiBu…
Browse files Browse the repository at this point in the history
…ilder` (emilk#5262)

During the sizing pass we want widgets to use up as little space as
possible, but it does not consider the sizing_pass field of `UiBuilder`.
  • Loading branch information
zhatuokun authored and hacknus committed Oct 30, 2024
1 parent d79a223 commit 61b9762
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/egui/src/ui.rs
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ impl Ui {
let style = style.unwrap_or_else(|| self.style.clone());
let sense = sense.unwrap_or(Sense::hover());

if self.sizing_pass {
if sizing_pass {
// During the sizing pass we want widgets to use up as little space as possible,
// so that we measure the only the space we _need_.
layout.cross_justify = false;
Expand Down

0 comments on commit 61b9762

Please sign in to comment.