Skip to content

Commit

Permalink
Update egui
Browse files Browse the repository at this point in the history
  • Loading branch information
lucasmerlin committed Sep 20, 2024
1 parent 8b9fcd6 commit a8eb622
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 13 deletions.
20 changes: 10 additions & 10 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 6 additions & 3 deletions crates/egui_flex/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -268,7 +268,10 @@ impl Flex {
// }
// }
// }
instance.ui.ctx().request_discard();
instance
.ui
.ctx()
.request_discard("Flex item added / removed / size changed");
instance.ui.ctx().request_repaint();
}

Expand Down Expand Up @@ -892,7 +895,7 @@ impl FlexContainerUi {
let available_size = ui.available_size();

let response = if self.remeasure_widget {
ui.ctx().request_discard();
ui.ctx().request_discard("Flex item remeasure");
let mut child_ui = ui.new_child(UiBuilder::new().max_rect(self.content_rect));
child_ui.set_invisible();
let response = child_ui.centered_and_justified(|ui| widget.ui(ui)).inner;
Expand Down Expand Up @@ -923,7 +926,7 @@ impl FlexContainerUi {

if remeasure_widget {
ui.ctx().request_repaint();
ui.ctx().request_discard();
ui.ctx().request_discard("Triggering flex item remeasure");

// dbg!(available_size);
// dbg!(intrinsic_size.round(), self.last_inner_size);
Expand Down

0 comments on commit a8eb622

Please sign in to comment.