diff --git a/crates/egui_demo_lib/src/demo/demo_app_windows.rs b/crates/egui_demo_lib/src/demo/demo_app_windows.rs index 2c3f37c5aaa3..84b6a2064a1b 100644 --- a/crates/egui_demo_lib/src/demo/demo_app_windows.rs +++ b/crates/egui_demo_lib/src/demo/demo_app_windows.rs @@ -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); } }