DesignCraft: An open-source page and layout design editor written by scratch in pure Rust
TOC-3: keep the table of contents title readable
moppeeer730880062379
diff --git a/ROADMAP.md b/ROADMAP.mdindex 9bd0274ef..835c968ed 100644--- a/ROADMAP.md+++ b/ROADMAP.md@@ -348,6 +348,8 @@ list) · [roadmap.md](docs/roadmap.md) (milestones, plan) · [parity-checklist.mNewest first.+- **2026-10-18** · Table of Contents reserves the title field's width so Contents is readable next to its style picker; the grid previously squeezed it to a few characters. No readiness percentage change.+- **2026-10-16** · Threading: the loaded text cursor threads into a text frame inside a group (it hit the group and showed it could not thread); a plain click still selects the group (#1075). Gap 27 closed. No readiness percentage change.- **2026-10-16** · Greek text hyphenates. The patterns were never compiled in, so Greek set unhyphenated however narrow the column; `"Greek"`, `"Greek: Greece"`, `el` and `el-GR` all resolve now and ανθρωπος breaks αν-θρω-πος. They are the monotonic patterns (hyph-el-monoton, Dimitrios Filippou, under MIT), which is what polytonic text hyphenates by too. Five of InDesign's ~40 hyphenation languages. No readiness percentage change.- **2026-10-16** · A swatch applied to a placed greyscale or bitmap image colours it, as in InDesign: IDML's `<Image FillColor>` is read and written, greyscale pixels become a tint of the swatch on opaque white and a bitmap's white lets the frame show through, on screen and in PDF (spot swatches print on their plate). Colour images keep their colours. Applying the swatch from the Swatches panel comes next. No readiness percentage change.diff --git a/crates/ui-egui/src/dialogs.rs b/crates/ui-egui/src/dialogs.rsindex 358416a4b..6885dc6d0 100644--- a/crates/ui-egui/src/dialogs.rs+++ b/crates/ui-egui/src/dialogs.rs@@ -6334,7 +6334,10 @@ fn toc_dialog(app: &mut DesignApp, ui: &mut egui::Ui, d: &mut Dialog) {let mut title_style = d.s("titleStyle");egui::Grid::new("toc_title").num_columns(4).spacing([8.0, 6.0]).show(ui, |ui| {crate::rtl::label(ui, tr("Title:"));- text_field(ui, d, "title", 200.0);+ let mut title = d.s("title");+ if ui.add_sized([200.0, ui.spacing().interact_size.y], egui::TextEdit::singleline(&mut title).horizontal_align(egui::Align::Min)).changed() {+ d.fields.insert("title".into(), json!(title));+ }crate::rtl::label(ui, tr("Style:"));toc_style_combo(ui, "title", &styles, "TOC Title", &mut title_style);ui.end_row();@@ -7957,6 +7960,24 @@ mod tests {assert_eq!(opts(&app), before);}+ /// The title stays readable beside the style selector after the grid settles.+ #[test]+ fn toc_title_field_shows_the_whole_default_title() {+ let mut app = DesignApp::new(designcraft_engine::Session::new(), crate::Services::default());+ app.run("file.newSample", json!({})).unwrap();+ open_toc(&mut app);+ let ctx = dialog_context("en");+ let screen = egui::Rect::from_min_size(egui::Pos2::ZERO, egui::vec2(1440.0, 900.0));+ for _ in 0..3 {+ dialog_frame(&mut app, &ctx, screen, vec![]);+ }+ let labels = dialog_frame(&mut app, &ctx, screen, vec![]);+ visible_label(&labels, screen, "Contents");+ app.ui.dialog.as_mut().unwrap().fields.insert("title".into(), json!("Table of Contents"));+ let labels = dialog_frame(&mut app, &ctx, screen, vec![]);+ visible_label(&labels, screen, "Table of Contents");+ }+#[test]fn toc_dialog_adds_a_style_and_ok_makes_the_table_of_contents() {let mut app = DesignApp::new(designcraft_engine::Session::new(), crate::Services::default());diff --git a/docs/ui-parity.md b/docs/ui-parity.mdindex 2dcf4687a..00f2df462 100644--- a/docs/ui-parity.md+++ b/docs/ui-parity.md@@ -1,6 +1,6 @@# UI and interaction parity-> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-10-15 · **Change:** minor (live corners work; document views row: scrollbars, Alt pans while editing text; Tabs panel listed as present (#343); spring-loaded Zoom navigation; paragraph style override feedback and clearing) · **Target:** Adobe InDesign 2026 (21.6, Medium Dark, macOS)+> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-10-18 · **Change:** minor (live corners work; document views row: scrollbars, Alt pans while editing text; Tabs panel listed as present (#343); spring-loaded Zoom navigation; paragraph style override feedback and clearing) · **Target:** Adobe InDesign 2026 (21.6, Medium Dark, macOS)Tools, handles, snapping, nudging, modifiers, shortcuts, panels, menus, context menus and feel,against InDesign 2026. The look was measured from the running app@@ -70,6 +70,9 @@ history (DC-1).## Remaining effort+The Table of Contents title field reserves its edit width inside the title/style row. The+default Contents title is fully visible instead of being clipped to its first few characters.+Applying a paragraph or character style now removes local values equal to the applied style,so text used to capture a style follows later edits to that style. Different local formattingand named character styles stay intact. Paragraph-style application treats selection endpoints