From 0153457580ec0409cee9f1554d1d049d0d1e35a4 Mon Sep 17 00:00:00 2001 From: bmh129 <11478682+bmh129@users.noreply.github.com> Date: Mon, 12 Oct 2026 16:03:47 -0500 Subject: [PATCH] View ribbon: lay out the Show group's checkboxes in two columns The Show group stacked Ruler, Formula Bar, Gridlines and Headings in one column, but the ribbon body fits only three rows, so Headings was cut off at the bottom and could not be reached. The four checkboxes now sit in two columns of two (Ruler/Gridlines, Formula Bar/Headings), as in Excel's Show group. Checked in English and German, which has the longest labels. Co-Authored-By: Claude Opus 5.5 --- crates/ui-egui/src/ribbon.rs | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/crates/ui-egui/src/ribbon.rs b/crates/ui-egui/src/ribbon.rs index e8291accd..135938c50 100644 --- a/crates/ui-egui/src/ribbon.rs +++ b/crates/ui-egui/src/ribbon.rs @@ -2106,6 +2106,7 @@ fn view(app: &mut SheetApp, ui: &mut Ui) { let lang = app.ui.language; let page_layout = app.session.active().and_then(|d| d.wb.active().map(|s| s.view == gridcraft_engine::model::SheetViewMode::PageLayout)).unwrap_or(false); + // Two columns of two, as in Excel's Show group: four stacked rows overflow the ribbon body. ui.vertical(|ui| { // Rulers exist only in Page Layout view. let mut ruler = !app.session.hide_ruler; @@ -2114,18 +2115,21 @@ fn view(app: &mut SheetApp, ui: &mut Ui) { if ruler_resp.changed() { act(app, "view.ruler", json!({"on": ruler})); } - let mut fb = app.session.prefs.formula_bar; - let resp = ui.checkbox(&mut fb, lang.tr("Formula Bar")); - control_keytip(app, ui, &resp, "view.formulaBar"); - if resp.changed() || invoke(app, "view.formulaBar") { - act(app, "view.formulaBar", json!({"on": !fb})); - } let mut g = s.0; let resp = ui.checkbox(&mut g, lang.tr("Gridlines")); control_keytip(app, ui, &resp, "view.gridlines"); if resp.changed() { act(app, "view.gridlines", json!({"on": g})); } + }); + ui.add_space(6.0); + ui.vertical(|ui| { + let mut fb = app.session.prefs.formula_bar; + let resp = ui.checkbox(&mut fb, lang.tr("Formula Bar")); + control_keytip(app, ui, &resp, "view.formulaBar"); + if resp.changed() || invoke(app, "view.formulaBar") { + act(app, "view.formulaBar", json!({"on": !fb})); + } let mut h = s.1; let resp = ui.checkbox(&mut h, lang.tr("Headings")); control_keytip(app, ui, &resp, "view.headings");