Skip to content

DesignCraft: An open-source page and layout design editor written by scratch in pure Rust

Merge PR #1406: Object: Corner Options opens a dialog laid out as the reference app's, also from the Properties Corner link

aiongg4a6be7eef5f9
diff --cc ROADMAP.md
index c54365beb,7d5407acf..188e55c1a
--- a/ROADMAP.md
+++ b/ROADMAP.md
@@@ -455,15 -443,7 +455,16 @@@ Newest first
- **2026-10-16** · Lock Guides and Lock Column Guides are commands in View ▸ Grids & Guides (`view.lockGuides`, ⌥⌘;, and `view.lockColumnGuides`), so the control channel and MCP reach them. Lock Column Guides is an undo step, is saved with the document, on in new ones, and read from and written to IDML's `ColumnGuideLocked`, which export always wrote as locked (#1096). No readiness percentage change.
- **2026-10-16** · IDML: a page keeps column guides that were dragged off centre (InDesign's Custom columns). They were divided evenly on import, so the gutter sprang back to the middle; the imported positions now place the columns, with the canvas guides, snapping and text placement following them, and they are written back on export. Layout › Margins and Columns re-divides them evenly when the count or gutter changes, as InDesign's does. No readiness percentage change.
- **2026-10-16** · IDML: custom column positions are checked before they are used (#1096). A set must give two edges per column, ascending from the left margin to the right one; any other (a wrong count, unsorted or non-numeric values, a list longer than 216 columns allow, or positions left behind by a margin or page-size change) is the even split, in the canvas, on import and on export, instead of columns drawn outside the margins. No readiness percentage change.
+- **2026-10-21** · Effects dialog: the Angle field of the shadows, Bevel and Emboss, Satin and Gradient Feather has InDesign's dial beside it, its radius pointing where the light comes from; a click or drag on it sets the angle. Found in the Learn Skills Daily course, chapter 14. No readiness percentage change.
+- **2026-10-21** · A double-click on a Fill or Stroke chip of Properties › Appearance opens the Color Picker with its colour, as in InDesign (a click still opens the swatches); for selected text, its own chips open it for the text. Found in the Learn Skills Daily course, chapter 23. No readiness percentage change.
+- **2026-10-20** · Properties › Appearance: with several text frames selected, the Fill and Stroke popups offer Apply To Frame or Text, as with one frame, so their text can be coloured at once, as in InDesign. No readiness percentage change.
+- **2026-10-20** · Properties › Appearance: the arrow beside Opacity opens a slider under the field, as in InDesign, instead of the Effects panel; a drag shows the opacity live and is one undo step (the Opacity link still opens Effects). No readiness percentage change.
+- **2026-10-20** · Properties › Frame Fitting has InDesign's Auto-Fit checkbox and Options button (Frame Fitting Options); the app's checkboxes are now named and ticked-or-not for screen readers. No readiness percentage change.
+- **2026-10-20** · Properties › Text Wrap shows the four wrap offsets under the wrap buttons, with the link that makes them the same, as InDesign's Properties panel does (greyed with no wrap). No readiness percentage change.
+- **2026-10-21** · Properties › Bullets and Numbering › Options opens the Bullets and Numbering dialog for the selected paragraphs, as InDesign's, instead of the Paragraph panel. Found in the Learn Skills Daily course, chapter 21. No readiness percentage change.
+- **2026-10-20** · Properties › Appearance: the corner shape list shows each shape's glyph beside its name, drawn as InDesign draws them (Fancy has its own glyph now), and the stroke type list shows each type's line; both dropdowns are named for screen readers. No readiness percentage change.
+- **2026-10-21** · Properties › Align: the Align To button shows what the objects align to, one glyph each for the selection, the key object, the margins, the page and the spread, as InDesign's. Found in the Learn Skills Daily course, chapter 12. No readiness percentage change.
+ - **2026-10-20** · Object › Corner Options opens a Corner Options dialog laid out as InDesign's: each corner's size and shape, the link button that makes all four the same, and Preview. The Corner link in Properties › Appearance opens it too (it opened a Rectangle size dialog). No readiness percentage change.
- **2026-10-21** · Properties › Character and Paragraph: ••• (More Options) expands the section in place, as InDesign's: Character adds vertical and horizontal scale, baseline shift, skew, language and OpenType, and All Caps, Small Caps, Superscript, Subscript, Underline and Strikethrough; Paragraph adds the left, right, first line and last line indents, space before and after, the drop cap's lines and characters, Align to Baseline Grid and Hyphenate. It used to open the Character or Paragraph panel; the language field moved under ••• as in InDesign. Found in the Learn Skills Daily course, chapter 16. No readiness percentage change.
- **2026-10-21** · The text Control panel has InDesign's two modes: A (Character Formatting Controls: font and style, size and leading, All Caps/Superscript/Underline and Small Caps/Subscript/Strikethrough, kerning and tracking, vertical and horizontal scale, baseline shift and skew, character style and language) and ¶ (Paragraph Formatting Controls: the nine alignments, left/first line and right/last line indents, space before and after, the drop cap's lines and characters, paragraph style, Hyphenate and Align to Baseline Grid). It used to show a fixed mix of both. Found in the Learn Skills Daily course, chapter 16. No readiness percentage change.
- **2026-10-20** · With the Type tool, the Control panel's font size, leading and tracking fields have a spinner and a list of common values, as in InDesign (auto leading in parentheses). No readiness percentage change.
diff --cc crates/ui-egui/src/i18n/ar.rs
index 34ba7ccd6,afd5d9f67..f3af616ed
--- a/crates/ui-egui/src/i18n/ar.rs
+++ b/crates/ui-egui/src/i18n/ar.rs
@@@ -31,8 -31,7 +31,9 @@@ pub(super) const TABLE: &[(&str, &str)
("Cut", "قص"),
("Copy", "نسخ"),
("Paste", "لصق"),
+ ("Stroke Type", "نوع الحد"),
+ ("Corner Shape", "شكل الزاوية"),
+ ("Corner Size and Shape:", "حجم الزوايا وشكلها:"),
("Restart Numbering", "إعادة الترقيم"),
("Continue Numbering", "متابعة الترقيم"),
("Keep Options…", "خيارات الإبقاء…"),
diff --cc crates/ui-egui/src/i18n/cs.rs
index 547280c2b,2041a216c..b0c02c4ff
--- a/crates/ui-egui/src/i18n/cs.rs
+++ b/crates/ui-egui/src/i18n/cs.rs
@@@ -32,8 -32,7 +32,9 @@@ pub(super) const TABLE: &[(&str, &str)
("Cut", "Vyjmout"),
("Copy", "Kopírovat"),
("Paste", "Vložit"),
+ ("Stroke Type", "Typ tahu"),
+ ("Corner Shape", "Tvar rohu"),
+ ("Corner Size and Shape:", "Velikost a tvar rohů:"),
("Restart Numbering", "Začít číslování znovu"),
("Continue Numbering", "Pokračovat v číslování"),
("Keep Options…", "Volby zachování…"),
diff --cc crates/ui-egui/src/i18n/de.rs
index 07df23349,077303acd..bed271778
--- a/crates/ui-egui/src/i18n/de.rs
+++ b/crates/ui-egui/src/i18n/de.rs
@@@ -31,8 -31,7 +31,9 @@@ pub(super) const TABLE: &[(&str, &str)
("Cut", "Ausschneiden"),
("Copy", "Kopieren"),
("Paste", "Einfügen"),
+ ("Stroke Type", "Konturtyp"),
+ ("Corner Shape", "Eckenform"),
+ ("Corner Size and Shape:", "Eckengröße und -form:"),
("Restart Numbering", "Nummerierung neu beginnen"),
("Continue Numbering", "Nummerierung fortführen"),
("Keep Options…", "Umbruchoptionen …"),
diff --cc crates/ui-egui/src/i18n/it.rs
index a627189f4,3b8c77531..c88f92b76
--- a/crates/ui-egui/src/i18n/it.rs
+++ b/crates/ui-egui/src/i18n/it.rs
@@@ -29,8 -29,7 +29,9 @@@ pub(super) const TABLE: &[(&str, &str)
("Cut", "Taglia"),
("Copy", "Copia"),
("Paste", "Incolla"),
+ ("Stroke Type", "Tipo traccia"),
+ ("Corner Shape", "Forma angolo"),
+ ("Corner Size and Shape:", "Dimensione e forma angoli:"),
("Restart Numbering", "Riavvia numerazione"),
("Continue Numbering", "Continua numerazione"),
("Keep Options…", "Opzioni di separazione…"),
diff --cc crates/ui-egui/src/i18n/ja.rs
index 8888e1a61,81346599f..b1ac2d62d
--- a/crates/ui-egui/src/i18n/ja.rs
+++ b/crates/ui-egui/src/i18n/ja.rs
@@@ -30,8 -30,7 +30,9 @@@ pub(super) const TABLE: &[(&str, &str)
("Cut", "カット"),
("Copy", "コピー"),
("Paste", "ペースト"),
+ ("Stroke Type", "線の種類"),
+ ("Corner Shape", "角のシェイプ"),
+ ("Corner Size and Shape:", "角のサイズとシェイプ:"),
("Restart Numbering", "番号の振り直し"),
("Continue Numbering", "番号の継続"),
("Keep Options…", "段落分離禁止オプション…"),
diff --cc crates/ui-egui/src/i18n/ka.rs
index f8ddde484,51fc758fd..5b7c5d72f
--- a/crates/ui-egui/src/i18n/ka.rs
+++ b/crates/ui-egui/src/i18n/ka.rs
@@@ -32,8 -32,7 +32,9 @@@ pub(super) const TABLE: &[(&str, &str)
("Cut", "ამოჭრა"),
("Copy", "კოპირება"),
("Paste", "ჩასმა"),
+ ("Stroke Type", "კონტურის ტიპი"),
+ ("Corner Shape", "კუთხის ფორმა"),
+ ("Corner Size and Shape:", "კუთხეების ზომა და ფორმა:"),
("Restart Numbering", "ნუმერაციის თავიდან დაწყება"),
("Continue Numbering", "ნუმერაციის გაგრძელება"),
("Keep Options…", "შენარჩუნების პარამეტრები…"),
diff --cc crates/ui-egui/src/i18n/pl.rs
index 9a691b890,c8122aabf..0c8dc2355
--- a/crates/ui-egui/src/i18n/pl.rs
+++ b/crates/ui-egui/src/i18n/pl.rs
@@@ -30,8 -30,7 +30,9 @@@ pub(super) const TABLE: &[(&str, &str)
("Cut", "Wytnij"),
("Copy", "Kopiuj"),
("Paste", "Wklej"),
+ ("Stroke Type", "Rodzaj obrysu"),
+ ("Corner Shape", "Kształt narożnika"),
+ ("Corner Size and Shape:", "Rozmiar i kształt narożników:"),
("Restart Numbering", "Zacznij numerowanie od nowa"),
("Continue Numbering", "Kontynuuj numerowanie"),
("Keep Options…", "Opcje utrzymywania…"),
diff --cc crates/ui-egui/src/i18n/pt_br.rs
index ede47231e,989c65639..f9a20c1ac
--- a/crates/ui-egui/src/i18n/pt_br.rs
+++ b/crates/ui-egui/src/i18n/pt_br.rs
@@@ -32,8 -32,7 +32,9 @@@ pub(super) const TABLE: &[(&str, &str)
("Cut", "Recortar"),
("Copy", "Copiar"),
("Paste", "Colar"),
+ ("Stroke Type", "Tipo de traçado"),
+ ("Corner Shape", "Forma do canto"),
+ ("Corner Size and Shape:", "Tamanho e forma dos cantos:"),
("Restart Numbering", "Reiniciar numeração"),
("Continue Numbering", "Continuar numeração"),
("Keep Options…", "Opções de manutenção…"),
diff --cc crates/ui-egui/src/i18n/ru.rs
index 60c4e7a27,e7c3a351d..a013b87d9
--- a/crates/ui-egui/src/i18n/ru.rs
+++ b/crates/ui-egui/src/i18n/ru.rs
@@@ -34,8 -34,7 +34,9 @@@ pub(super) const TABLE: &[(&str, &str)
("Cut", "Вырезать"),
("Copy", "Копировать"),
("Paste", "Вставить"),
+ ("Stroke Type", "Тип обводки"),
+ ("Corner Shape", "Форма угла"),
+ ("Corner Size and Shape:", "Размер и форма углов:"),
("Restart Numbering", "Начать нумерацию заново"),
("Continue Numbering", "Продолжить нумерацию"),
("Keep Options…", "Параметры удержания…"),
diff --cc crates/ui-egui/src/i18n/table.rs
index ff993212b,af84cb237..148fdd599
--- a/crates/ui-egui/src/i18n/table.rs
+++ b/crates/ui-egui/src/i18n/table.rs
@@@ -121,8 -121,10 +121,12 @@@ pub(super) const TABLE: &[(&str, [&str
("Cut", ["Ausschneiden", "Couper", "Cortar", "カット", "剪切"]),
("Copy", ["Kopieren", "Copier", "Copiar", "コピー", "复制"]),
("Paste", ["Einfügen", "Coller", "Pegar", "ペースト", "粘贴"]),
+ ("Stroke Type", ["Stroke Type", "Type de contour", "Tipo de trazo", "Stroke Type", "描边类型"]),
+ ("Corner Shape", ["Corner Shape", "Forme d'angle", "Forma de esquina", "Corner Shape", "角形状"]),
+ (
+ "Corner Size and Shape:",
+ ["Eckengröße und -form:", "Taille et forme des angles:", "Tamaño y forma de esquinas:", "角のサイズとシェイプ:", "角大小和形状:"],
+ ),
("Hide Rulers", ["Lineale ausblenden", "Masquer les règles", "Ocultar reglas", "定規を隠す", "隐藏标尺"]),
("Inches Decimal", ["Zoll dezimal", "Pouces décimaux", "Pulgadas decimales", "インチ(10 進)", "十进制英寸"]),
(
diff --cc crates/ui-egui/src/i18n/uk.rs
index 644535181,d0e18b9ad..686139909
--- a/crates/ui-egui/src/i18n/uk.rs
+++ b/crates/ui-egui/src/i18n/uk.rs
@@@ -30,8 -30,7 +30,9 @@@ pub(super) const TABLE: &[(&str, &str)
("Cut", "Вирізати"),
("Copy", "Копіювати"),
("Paste", "Вставити"),
+ ("Stroke Type", "Тип обведення"),
+ ("Corner Shape", "Форма кута"),
+ ("Corner Size and Shape:", "Розмір і форма кутів:"),
("Restart Numbering", "Почати нумерацію знову"),
("Continue Numbering", "Продовжити нумерацію"),
("Keep Options…", "Параметри утримання…"),
diff --cc crates/ui-egui/src/panels/properties.rs
index cf14155e6,888302763..ecb9e664a
--- a/crates/ui-egui/src/panels/properties.rs
+++ b/crates/ui-egui/src/panels/properties.rs
@@@ -30,10 -30,8 +30,10 @@@ pub use flex::flex_panel
use flex::flex_section;
pub(crate) use links::run_update_links;
pub use links::{info_panel, links_panel, preflight_panel, update_links};
+#[cfg(test)]
+use object::{align_to_icon, preview_row};
use object::{align_row, appearance_section, guide_section, quick_actions_object, transform_section, wrap_section};
- pub(crate) use object::{corner_type_dropdown, ref_point_proxy, stroke_type_dropdown};
+ pub(crate) use object::{corner_shape_button, corner_type_dropdown, ref_point_proxy, stroke_type_dropdown};
use object_panels::pathfinder_row;
pub use object_panels::{align_panel, attributes_panel, effects_panel, pathfinder_panel, stroke_panel, wrap_panel};
pub(crate) use text::{LANGUAGES, kerning_control, language_menu};
diff --cc crates/ui-egui/src/panels/properties/object.rs
index 1ae1cea0c,93375a936..61bc3c38d
--- a/crates/ui-egui/src/panels/properties/object.rs
+++ b/crates/ui-egui/src/panels/properties/object.rs
@@@ -267,56 -234,43 +267,61 @@@ pub(super) fn preview_dropdown(ui: &mu
resp
}
-fn paint_corner_shape(p: &egui::Painter, r: Rect, shape: CornerShape) {
- let c = egui::Color32::BLACK;
- let s = Stroke::new(1.5, c);
- let (x0, y0, x1, y1) = (r.min.x + 4.0, r.min.y + 4.0, r.max.x - 9.0, r.max.y - 3.0);
- let k = 8.0;
- let pts: Vec<egui::Pos2> = match shape {
- CornerShape::None => vec![pos2(x0, y0), pos2(x1, y0), pos2(x1, y1)],
- CornerShape::Bevel => vec![pos2(x0, y0), pos2(x1 - k, y0), pos2(x1, y0 + k), pos2(x1, y1)],
- CornerShape::Inset => vec![pos2(x0, y0), pos2(x1 - k, y0), pos2(x1 - k, y0 + k), pos2(x1, y0 + k), pos2(x1, y1)],
- CornerShape::Rounded | CornerShape::InverseRounded | CornerShape::Fancy => {
- let mut v = vec![pos2(x0, y0)];
- for i in 0..=8 {
- let a = i as f32 / 8.0 * std::f32::consts::FRAC_PI_2;
- v.push(if shape == CornerShape::InverseRounded {
- pos2(x1 - k * a.cos(), y0 + k * a.sin())
- } else {
- pos2(x1 - k + k * a.sin(), y0 + k - k * a.cos())
- });
- }
- v.push(pos2(x1, y1));
- v
- }
+/// A corner shape's glyph, as InDesign draws it in its corner lists: the top edge running into the
+/// corner and the right edge leaving it, in a square centred in `r`.
+fn paint_corner_shape(p: &egui::Painter, r: Rect, shape: CornerShape, c: egui::Color32) {
+ let side = (r.width() - 3.0).min(r.height() - 3.0).max(4.0);
+ let o = pos2(r.center().x - side / 2.0, r.center().y - side / 2.0);
+ let at = |x: f32, y: f32| pos2(o.x + x * side, o.y + y * side);
+ let quarter = |cx: f32, cy: f32, rad: f32, from: f32, to: f32| -> Vec<egui::Pos2> {
+ (0..=10).map(|i| from + (to - from) * i as f32 / 10.0).map(|a| at(cx + rad * a.cos(), cy + rad * a.sin())).collect()
+ };
+ use std::f32::consts::{FRAC_PI_2, PI};
+ let stroke = Stroke::new(1.6, c);
+ let line = |pts: Vec<egui::Pos2>| {
+ p.add(egui::Shape::line(pts, stroke));
};
- p.add(egui::Shape::line(pts, s));
+ match shape {
+ CornerShape::None => line(vec![at(0.0, 0.0), at(1.0, 0.0), at(1.0, 1.0)]),
+ // The corner cut by a diagonal, half the side.
+ CornerShape::Bevel => line(vec![at(0.0, 0.0), at(0.5, 0.0), at(1.0, 0.5), at(1.0, 1.0)]),
+ // A square notch.
+ CornerShape::Inset => line(vec![at(0.0, 0.0), at(0.5, 0.0), at(0.5, 0.45), at(1.0, 0.45), at(1.0, 1.0)]),
+ // A concave quarter circle centred on the corner.
+ CornerShape::InverseRounded => {
+ let mut v = vec![at(0.0, 0.0)];
+ v.extend(quarter(1.0, 0.0, 0.5, PI, FRAC_PI_2));
+ v.push(at(1.0, 1.0));
+ line(v)
+ }
+ // A large convex arc.
+ CornerShape::Rounded => {
+ let mut v = vec![at(0.0, 0.0)];
+ v.extend(quarter(0.08, 0.92, 0.92, -FRAC_PI_2, 0.0));
+ v.push(at(1.0, 1.0));
+ line(v)
+ }
+ // Steps into the corner with a small square loop between them.
+ CornerShape::Fancy => {
+ line(vec![at(0.0, 0.0), at(0.38, 0.0), at(0.38, 0.2), at(0.52, 0.2)]);
+ p.rect_stroke(Rect::from_min_max(at(0.52, 0.06), at(0.76, 0.3)), 0.0, stroke, StrokeKind::Middle);
+ line(vec![at(0.76, 0.3), at(0.76, 0.48), at(1.0, 0.48), at(1.0, 1.0)]);
+ }
+ }
}
+ /// A corner shape picker's face: the shape's glyph and the dropdown arrow (the menu is the caller's).
+ pub(crate) fn corner_shape_button(ui: &mut Ui, shape: CornerShape, width: f32) -> egui::Response {
+ preview_dropdown(ui, width, |p, r| paint_corner_shape(p, r, shape))
+ }
+
pub(crate) fn corner_type_dropdown(app: &mut DesignApp, ui: &mut Ui, shape: CornerShape, size: f64, width: f32) {
- let resp = preview_dropdown(ui, width, |p, r| paint_corner_shape(p, r, shape));
+ let resp =
+ preview_dropdown(ui, width, crate::i18n::tr(&app.ui.language, "Corner Shape"), |p, r| paint_corner_shape(p, r, shape, egui::Color32::BLACK));
egui::Popup::menu(&resp).show(|ui| {
- ui.set_min_width(140.0);
+ ui.set_min_width(150.0);
for s in CornerShape::ALL {
- if ui.selectable_label(s == shape, crate::rtl::widget(ui, crate::i18n::tr(&app.ui.language, s.label()))).clicked() {
+ if preview_row(ui, s == shape, crate::i18n::tr(&app.ui.language, s.label()), 22.0, |p, r, c| paint_corner_shape(p, r, s, c)).clicked() {
let _ = app.run("object.cornerOptions", json!({"shape": s, "size": if size > 0.0 { size } else { 12.0 }}));
ui.close();
}