Skip to content

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

Canvas: the cursor readout is InDesign's light grey box

moppeeer7db54c52e3a3
diff --git a/ROADMAP.md b/ROADMAP.md
index 0128924c0..40ed35432 100644
--- a/ROADMAP.md
+++ b/ROADMAP.md
@@ -348,6 +348,7 @@ list) · [roadmap.md](docs/roadmap.md) (milestones, plan) · [parity-checklist.m
Newest first.
+- **2026-10-21** · The readout beside the cursor while drawing or measuring ("W: 3.13 cm") is InDesign's light grey box with white text, measured from the tutorials' frames; High Contrast keeps it black. It was a dark translucent box. No readiness percentage change.
- **2026-10-16** · Type › Reload Fonts (`font.reload`): fonts installed, edited or removed while DesignCraft runs are read again without a restart, and the open documents recompose with them (#328, #547). An edited font file is noticed by its length and modification time; bundled, added and document fonts stay as they are. InDesign does this by itself, so noticing changes automatically is still open (gap 6). No readiness percentage change.
- **2026-10-16** · Parents can be deleted from their Pages-panel context menu or `layout.parents.delete {id}`. Applied-page and based-on references are cleared, local override copies survive, and Undo restores the parent. Addresses the deletion portion of #956; no readiness percentage change.
- **2026-10-17** · File › Package writes the document's and the IDML's links relative to the package (`Links/logo.png`, `file:Links/logo.png`), so a package holds no path from the machine that made it; opening a document resolves them to the files beside it. Links › Copy Link(s) To still links by full path. (#340). No readiness percentage change.
diff --git a/crates/ui-egui/src/canvas.rs b/crates/ui-egui/src/canvas.rs
index 8d94f099f..5f37574bf 100644
--- a/crates/ui-egui/src/canvas.rs
+++ b/crates/ui-egui/src/canvas.rs
@@ -1705,7 +1705,7 @@ fn draw_tool_overlays(app: &mut DesignApp, painter: &egui::Painter, xf: &Xf) {
let s = xf.to_screen(p) + vec2(14.0, 14.0);
let g = painter.layout_no_wrap(text, egui::FontId::proportional(11.0), tok.measure_text);
let r = Rect::from_min_size(s, g.size() + vec2(10.0, 6.0));
- painter.rect_filled(r, 3.0, tok.measure_bg);
+ painter.rect_filled(r, 3.0, tok.readout_bg);
painter.galley(r.min + vec2(5.0, 3.0), g, tok.measure_text);
}
Overlay::Line { a, b, color, dashed: d } => {
diff --git a/crates/ui-egui/src/theme.rs b/crates/ui-egui/src/theme.rs
index 7b2364ffe..cce524de3 100644
--- a/crates/ui-egui/src/theme.rs
+++ b/crates/ui-egui/src/theme.rs
@@ -83,6 +83,9 @@ pub struct Tokens {
/// Measurement labels on the canvas (smart dimensions, gaps).
pub measure_bg: Color32,
pub measure_text: Color32,
+ /// The readout beside the cursor while drawing, moving or measuring ("W: 3.13 cm"): InDesign's
+ /// light grey box with white text, in every brightness but High Contrast.
+ pub readout_bg: Color32,
/// Live-corner widget and corner diamonds.
pub live_corner: Color32,
/// The Windows caption Close button when hovered, and its glyph.
@@ -130,6 +133,7 @@ impl Tokens {
smart_guide: hex(0x00c853),
measure_bg: Color32::from_rgba_unmultiplied(70, 70, 70, 230),
measure_text: Color32::WHITE,
+ readout_bg: hex(0xa8a8a8),
live_corner: hex(0xffe500),
caption_close: hex(0xc42b1c),
caption_close_text: Color32::WHITE,
@@ -255,6 +259,8 @@ impl Tokens {
ruler_text: hex(0xffffff),
section_divider: hex(0xffffff),
tab_strip: hex(0x000000),
+ // White on InDesign's grey is too faint here: black, as the rest of the chrome.
+ readout_bg: hex(0x000000),
..dark
},
}
@@ -797,3 +803,21 @@ mod russian_font_tests {
}
}
}
+
+#[cfg(test)]
+mod readout_tests {
+ use super::{Brightness, Tokens};
+
+ /// The readout beside the cursor ("W: 3.13 cm" while drawing a frame) is InDesign's light
+ /// grey box with white text in every brightness, as measured from the tutorials' frames;
+ /// High Contrast keeps it black.
+ #[test]
+ fn the_cursor_readout_is_indesigns_light_grey() {
+ for b in [Brightness::Dark, Brightness::MediumDark, Brightness::MediumLight, Brightness::Light] {
+ let t = Tokens::for_brightness(b);
+ assert_eq!(t.readout_bg, egui::Color32::from_rgb(0xa8, 0xa8, 0xa8), "{b:?}");
+ assert_eq!(t.measure_text, egui::Color32::WHITE, "{b:?}");
+ }
+ assert_eq!(Tokens::for_brightness(Brightness::HighContrast).readout_bg, egui::Color32::BLACK);
+ }
+}