Skip to content

Commit

Permalink
Hide expand/collapse functionality when hidden
Browse files Browse the repository at this point in the history
  • Loading branch information
Norlock committed Jul 17, 2024
1 parent 316adf4 commit fd663fe
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
2 changes: 0 additions & 2 deletions crates/egui/src/containers/window.rs
Original file line number Diff line number Diff line change
Expand Up @@ -503,8 +503,6 @@ impl<'open> Window<'open> {
let area_layer_id = area.layer();
let resize_id = area_id.with("resize");

//println!("{collapsing:?}");

let is_expanded = with_title_bar && collapsing.is_expanded();
let possible = PossibleInteractions::new(&area, &resize, is_expanded);

Expand Down
2 changes: 1 addition & 1 deletion crates/egui_demo_lib/src/demo/demo_app_windows.rs
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ impl DemoWindows {
self.about_window_action = Some(WindowAction::ToggleShow);
}

if ui.button("Toggle expand/collapse about").clicked() {
if self.about_is_open && ui.button("Toggle expand/collapse about").clicked() {
self.about_window_action = Some(WindowAction::ToggleExpand);
}
}
Expand Down

0 comments on commit fd663fe

Please sign in to comment.