A tool window for sketch Offset, with a typed Distance, Flip and Chain (#731)

Sketch Offset gets its own tool window with a typed Distance, Flip and Chain, as a variant of the sketch modify window.
This commit is contained in:
William Dunn authored and GitHub committed 2026-10-13 12:46:24 -04:00
1 parent 1a0100cdd9
commit beca7eb126
10 files changed
+239 -69

No files matched your search

+8 -1
View File
@@ -248,7 +248,7 @@ pub enum Kind {
/// Edit Text: a sketch text's content and placement (`sketch_text`).
Text(crate::sketch_text::Tx),
TextMove(crate::sketch_text_move::TextMove),
/// Sketch-space modify tools: scale, and later offset, fillet, chamfer, the patterns,
/// Sketch-space modify tools: scale and offset, and later fillet, chamfer, the patterns,
/// mirror and move (`sketch_modify_ui`).
SketchModify(crate::sketch_modify_ui::Mod),
}
@@ -918,6 +918,13 @@ pub(crate) fn field(ui: &mut egui::Ui, s: &mut String) -> bool {
r.lost_focus() && ui.input(|i| i.key_pressed(egui::Key::Enter))
}
/// A checkbox row. Its row handle (`dialog:<row label>`) lets a scenario click it by the label
/// beside it, the way `field` already publishes one for a value field.
pub(crate) fn check(ui: &mut egui::Ui, on: &mut bool) {
let r = ui.checkbox(on, "");
publish_row(&r);
}
pub(crate) fn combo(ui: &mut egui::Ui, id: &str, labels: &[&str], sel: &mut usize) {
let row = ROW.with(|r| r.borrow().clone());
let selected = labels.get(*sel).copied().map(tr).unwrap_or("");