Browse / github.com/storytold/gridcraft / patch
fix(ui): align Protect Workbook info text (#2449)
Info panel's Protect Workbook text sits too low In File > Info, the Protect Workbook description sits too low next to its button, so the text and the button are misaligned. **Expected:** the title and description line up with the button. **Actual:** the description sits near the bottom of the card. **Environment:** GridCraft v0.11.1, Windows 11 (build 10.0.26300), display scale 100%
- Status
- open
- Score
- 0.00
- Adopters
- 0 other operators
- Author
- bryanmenezes-qmc (imported from pull request #2659, open)
- Base
45f5ab18e4e57bf50ee88d2526deb4b87c5b24cb- Size
- +15 −1 in 2 files
- Review
- pending
- Shared
- 2026-10-28
- Id
37cfcea87970bf03d9f265c4
How it went
No other operator has reported using it yet.
Diff
raw · crates/ui-egui/src/backstage.rs crates/ui-egui/tests/it/file_menu.rs
@@ -630,7 +630,6 @@ fn info(app: &mut SheetApp, ui: &mut Ui, bs: &mut Backstage) { } ui.add_space(12.0); ui.vertical(|ui| {- ui.add_space(14.0); ui.label(RichText::new(lang.tr("Protect Workbook")).font(theme::ui_bold(13.5)).color(t.text)); let text = if protected { "Sheet structure is locked: sheets can't be added, moved, renamed or deleted."@@ -127,6 +127,21 @@ fn file_options_opens_the_options_page_and_pages_are_reachable_by_command() { assert!(h.state().backstage.is_none()); } +#[test]+/// The Protect Workbook text remains above the centerline of its tall action button.+fn protect_workbook_info_text_is_aligned_with_its_button() {+ let mut h = harness(Services::default());+ h.state_mut().run("ui.backstage", serde_json::json!({"page": "info"})).unwrap();+ h.run_steps(3);++ let button = h.get_by_role_and_label(egui::accesskit::Role::Button, "Protect Workbook").rect();+ let description = h.get_by_label("Lock the sheet structure so sheets can't be added, moved, renamed or deleted.").rect();+ assert!(+ description.center().y <= button.center().y - 10.0,+ "Protect Workbook description should no longer sit low beside its button: button={button:?}, description={description:?}"+ );+}+ #[test] fn translated_options_headings_show_no_context_prefix() { for language in [Language::Fr, Language::Sr, Language::Nl, Language::Ro] {