diff --git a/crates/ui-egui/src/dialogs.rs b/crates/ui-egui/src/dialogs.rs index 6335f8fca..702c6bcc2 100644 --- a/crates/ui-egui/src/dialogs.rs +++ b/crates/ui-egui/src/dialogs.rs @@ -1106,9 +1106,11 @@ fn text_frame_options_dialog(app: &DesignApp, ui: &mut egui::Ui, d: &mut Dialog) } ui.set_min_width(560.0); ui.horizontal_top(|ui| { - // A fixed height: the separator would otherwise stretch the dialog to the window. - ui.set_min_height(330.0); - ui.set_max_height(330.0); + // A fixed height: the separator would otherwise stretch the dialog to the window. A + // non-rectangular frame's Inset row needs one more row. + let height = if d.b("_shaped") { 360.0 } else { 330.0 }; + ui.set_min_height(height); + ui.set_max_height(height); section_list( &lang, ui, diff --git a/crates/ui-egui/src/dialogs/tests.rs b/crates/ui-egui/src/dialogs/tests.rs index 8f1681611..38ffc28cb 100644 --- a/crates/ui-egui/src/dialogs/tests.rs +++ b/crates/ui-egui/src/dialogs/tests.rs @@ -1549,6 +1549,14 @@ fn text_frame_options_dims_the_sides_for_a_non_rectangular_frame() { } assert_eq!(h.query_by_label("Inset:").is_some(), shaped, "{shape}: the Inset caption"); assert_eq!(h.query_by_label("Increase tfo_inset").is_some(), shaped, "{shape}: the Inset field"); + // The General tab fits in the dialog's fixed height: the buttons stay put on another tab. + let (wrap, cancel) = (h.get_by_label("Ignore Text Wrap").rect().bottom(), h.get_by_label("Cancel").rect().top()); + assert!(wrap < cancel, "{shape}: Ignore Text Wrap ends at {wrap}, below the top of Cancel at {cancel}"); + h.get_by_label("Auto-Size").click(); + h.run_steps(3); + assert_eq!(h.get_by_label("Cancel").rect().top(), cancel, "{shape}: the buttons stay put on another tab"); + h.get_by_label("General").click(); + h.run_steps(3); // The link toggles only for a rectangle. let linked = |h: &Harness<'_, DesignApp>| h.state().ui.dialog.as_ref().unwrap().b("insetLinked"); let before = linked(&h);