Skip to content

Commit

Permalink
Fix Id clash in Frame styling widget (#4967)
Browse files Browse the repository at this point in the history
As we have two Margin widgets in the same UI and this widget has a Grid
with a hardcoded Id, we have to force a different Id to one of them to
avoid clashes.

* Closes <#4965>
* [x] I have followed the instructions in the PR template
  • Loading branch information
YgorSouza authored Aug 26, 2024
1 parent cc3a091 commit a0c4e28
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion crates/egui/src/style.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2501,7 +2501,8 @@ impl Widget for &mut crate::Frame {
ui.end_row();

ui.label("Outer margin");
ui.add(outer_margin);
// Push Id to avoid clashes in the Margin widget's Grid
ui.push_id("outer", |ui| ui.add(outer_margin));
ui.end_row();

ui.label("Rounding");
Expand Down

0 comments on commit a0c4e28

Please sign in to comment.