Freehand Tool Options: Accurate/Smooth ends on the Fidelity slider, Spanish rows (review of #390)

The Fidelity slider names its ends, Accurate and Smooth, through a
shared form::slider_ends that the Color Guide Options' Less/More now use
too. The dialog's strings get Spanish rows (complete catalog), and
Accurate rows in every catalog. ROADMAP: the Drawing tools row lists
what the freehand Tool Options still lack (Keep selected, Alt to the
Smooth tool, Blob Brush Merge Only with Selection, brush angle and
roundness).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
bflatastic
2026-10-08 07:32:09 +07:00
co-authored by Claude Opus 5.5
parent 02582f318d
commit 505f3bd7ae
9 changed files with 34 additions and 9 deletions
+1 -1
View File
@@ -191,7 +191,7 @@ about 1–1.5 agent-hours each, so the other rows (estimated on the older scale)
| Area | Weight | Done | Missing (main items) | One agent (h) |
|---|---:|---:|---|---:|
| Selection, transform & align tools | 6 | 85% | Free Transform/Scale/Reflect along a rotated box, Start Global Edit, transform nuances (the rotated persistent bounding box is done) | 4–6 |
| Drawing tools | 7 | 85% | Shaper Groups (merge/punch overlapping shapes), pencil and the remaining pen modifier nuances, Touch Type, Live Corners on plain paths and polygons (and Relative rounding) | 10–15 |
| Drawing tools | 7 | 85% | Shaper Groups (merge/punch overlapping shapes), pencil and the remaining pen modifier nuances, the freehand Tool Options' Keep selected, Alt to the Smooth tool, Blob Brush Merge Only with Selection and brush angle/roundness, Touch Type, Live Corners on plain paths and polygons (and Relative rounding) | 10–15 |
| Path operations, Pathfinder, Shape Builder, Live Paint | 5 | 86% | Live Paint gap options, Shape Builder gap detection and options | 3–6 |
| Colour, swatches, gradients, patterns, mesh, recolor | 7 | 96% | freeform and mixed spot/process gradients in SVG/PDF (exported as stops or process colours), pattern fills in Expand | 2–4 |
| Strokes, brushes, width profiles | 5 | 88% | brush options depth, brush libraries (generated in code), brushes driven by pen tilt, bearing and barrel rotation (6D art pens) | 12–20 |
@@ -41,13 +41,7 @@ fn body(app: &mut VectorcraftApp, ui: &mut egui::Ui, d: &mut Dialog) -> bool {
};
form::slider(ui, d, "steps", tl!("Steps:"), 1.0..=max, "", &ramp);
form::slider(ui, d, "amount", tl!("Variation:"), 0.0..=100.0, "%", &ramp);
ui.horizontal(|ui| {
ui.add_space(form::SLIDER_LABEL + ui.spacing().item_spacing.x);
let (r, _) = ui.allocate_exact_size(vec2(form::SLIDER_WIDTH, 14.0), Sense::hover());
let font = egui::FontId::proportional(11.0);
ui.painter().text(r.left_center(), egui::Align2::LEFT_CENTER, tl!("Less"), font.clone(), t.text_dim);
ui.painter().text(r.right_center(), egui::Align2::RIGHT_CENTER, tl!("More"), font, t.text_dim);
});
form::slider_ends(ui, form::SLIDER_LABEL, (tl!("Less"), tl!("More")));
ui.add_space(10.0);
// Preview: the base colour's row of variations.
let o = options(app, d);
+13
View File
@@ -329,6 +329,19 @@ pub(super) fn slider_w(
}
}
/// The words at the two ends of a slider's rail (Less … More), under a slider whose label column
/// is `label_w` wide.
pub(super) fn slider_ends(ui: &mut egui::Ui, label_w: f32, (left, right): (&str, &str)) {
let t = Tokens::get(ui.ctx());
ui.horizontal(|ui| {
ui.add_space(label_w + ui.spacing().item_spacing.x);
let (r, _) = ui.allocate_exact_size(egui::vec2(SLIDER_WIDTH, 14.0), egui::Sense::hover());
let font = egui::FontId::proportional(11.0);
ui.painter().text(r.left_center(), egui::Align2::LEFT_CENTER, left, font.clone(), t.text_dim);
ui.painter().text(r.right_center(), egui::Align2::RIGHT_CENTER, right, font, t.text_dim);
});
}
/// The field where [`preview`] keeps the parameters it last previewed.
pub(super) const PREVIEWED: &str = "__previewed";
+10 -1
View File
@@ -80,6 +80,7 @@ fn fidelity(ui: &mut egui::Ui, d: &mut Dialog) {
if let Some(n) = new.filter(|n| *n != v) {
d.fields.insert("fidelity".into(), json!(n));
}
form::slider_ends(ui, label_w, (tl!("Accurate"), tl!("Smooth")));
ui.label(
egui::RichText::new(tl!("A lower value follows the stroke closely; a higher one gives fewer points and smoother curves."))
.size(11.5)
@@ -136,7 +137,15 @@ mod tests {
// Pencil: Fidelity, fill, the two tolerances; no Size.
app.run("tool.options", json!({"tool": "pencil"})).unwrap();
let text = painted(&mut app);
for label in ["Pencil Tool Options", "Fidelity:", "Fill new strokes", "Close paths when ends are within:", "Edit selected paths within:"] {
for label in [
"Pencil Tool Options",
"Fidelity:",
"Accurate",
"Smooth",
"Fill new strokes",
"Close paths when ends are within:",
"Edit selected paths within:",
] {
assert!(text.contains(label), "{label} in {text}");
}
assert!(!text.contains("Size:"), "{text}");
+5
View File
@@ -36,11 +36,13 @@
[Default] is protected: New… starts an editable copy. [Predeterminado] está protegido: Nuevo… crea una copia editable.
[Unnamed] [Sin nombre]
A File… Un archivo…
A lower value follows the stroke closely; a higher one gives fewer points and smoother curves. Un valor menor sigue el trazo de cerca; uno mayor da menos puntos y curvas más suaves.
A new preset starting from the selected one Un preajuste nuevo a partir del seleccionado
A saved copy of the selected preset Una copia guardada del preajuste seleccionado
About VectorCraft Acerca de VectorCraft
above arriba
Absolute Position Posición absoluta
Accurate Preciso
Abutting Contiguo
Action {n} Acción {n}
Actions Acciones
@@ -347,6 +349,7 @@
Close All Cerrar todo
Close Library Cerrar biblioteca
Close Path Cerrar trazado
Close paths when ends are within: Cerrar trazados cuando los extremos estén a menos de:
Cmd Cmd
CMYK CMYK
CMYK Color Color CMYK
@@ -726,6 +729,7 @@
Edit Pattern Editar motivo
Edit PDF Preset Editar preajuste de PDF
Edit Print Preset Editar preajuste de impresión
Edit selected paths within: Editar trazados seleccionados a menos de:
Edit Selection Editar selección
Edit Selection… Editar selección…
Edit Symbol Editar símbolo
@@ -892,6 +896,7 @@
Fill & Stroke Relleno y trazo
Fill (X), double-click for the Color Picker Relleno (X), doble clic para el selector de color
Fill and Stroke Relleno y trazo
Fill new strokes Rellenar trazos nuevos
Fill Color Color de relleno
Fill New Type Objects With Placeholder Text Rellenar nuevos objetos de texto con texto de muestra
Fill Rule Regla de relleno
Can't render this file because it contains an unexpected character in line 2 and column 73.
+1
View File
@@ -664,6 +664,7 @@
A new preset starting from the selected one 選択したプリセットをもとにした新しいプリセット
A saved copy of the selected preset 選択したプリセットの保存済みの複製
Absolute Position 絶対位置
Accurate 精細
Abutting 隣接
Activate Document ドキュメントをアクティブにする
Active Perspective Plane アクティブな遠近面
Can't render this file because it contains an unexpected character in line 2 and column 73.
+1
View File
@@ -104,6 +104,7 @@
A saved copy of the selected preset Uma cópia salva do predefinido selecionado
About VectorCraft Sobre o VectorCraft
Absolute Position Posição Absoluta
Accurate Preciso
Abutting Contíguo
Actions Ações
Activate Document Ativar Documento
Can't render this file because it contains an unexpected character in line 6 and column 47.
+1
View File
@@ -46,6 +46,7 @@
About VectorCraft 关于 VectorCraft
above 以上
Absolute Position 绝对位置
Accurate 精确
Abutting 相邻
Action {n} 动作 {n}
Actions 动作
Can't render this file because it contains an unexpected character in line 2 and column 73.
+1
View File
@@ -54,6 +54,7 @@
About VectorCraft 關於 VectorCraft
above 以上
Absolute Position 絕對位置
Accurate 精確
Abutting 相鄰
Action {n} 動作 {n}
Actions 動作
Can't render this file because it contains an unexpected character in line 6 and column 47.