Skip to content

PhotoCraft: An open-source, photo editor written by scratch in pure Rust

Merge remote-tracking branch 'origin/main' into field-wheel-5473

Khawar Zamman Wanid182b2de15d2
diff --cc crates/ui-egui/src/widgets.rs
index a1cae67ef,533f1ee05..361b57212
--- a/crates/ui-egui/src/widgets.rs
+++ b/crates/ui-egui/src/widgets.rs
@@@ -598,22 -622,16 +635,26 @@@ fn value_field_box
// Round to 4 decimal places, so repeated 0.1 steps don't leave float errors.
let v = (v * 1e4).round() / 1e4;
// `f32::clamp` panics on a reversed or NaN range, which `DragValue::range` accepts.
- *value = if lo <= hi { v.clamp(lo, hi) } else { v };
- // Only take focus back after a typed sum gave it up: re-requesting it while held resets
- // the field's arrow-key filter next frame, and a held arrow then moves focus away (#5474).
- if !ui.memory(|m| m.has_focus(resp.id)) {
- ui.memory_mut(|m| m.request_focus(resp.id));
+ let v = if lo <= hi { v.clamp(lo, hi) } else { v };
+ // A wild wheel delta must not leave infinity in the field.
+ if v.is_finite() {
+ *value = v;
+ }
+ // A wheel step over a field without focus leaves the focus where it is.
+ if focused.is_some() {
- ui.memory_mut(|m| m.request_focus(resp.id));
++ // Only take focus back after a typed sum gave it up: re-requesting it while held resets
++ // the field's arrow-key filter next frame, and a held arrow then moves focus away (#5474).
++ if !ui.memory(|m| m.has_focus(resp.id)) {
++ ui.memory_mut(|m| m.request_focus(resp.id));
++ }
+ // The text stays selected, as in Photoshop: typing after a step replaces the value.
+ crate::field_tab::select_all(ui.ctx(), resp.id, &if fine { fmt_num2(f64::from(*value)) } else { fmt_num(f64::from(*value)) });
}
- // The text stays selected, as in Photoshop: typing after a step replaces the value.
- crate::field_tab::select_all(ui.ctx(), resp.id, &if fine { fmt_num2(f64::from(*value)) } else { fmt_num(f64::from(*value)) });
resp.mark_changed();
}
+ if ui.memory(|m| m.has_focus(resp.id)) {
+ crate::field_wheel::set_focused(ui.ctx(), resp.id, slot.id);
+ }
(resp, rect)
}
diff --cc docs/ui-parity.md
index ae74ffcb8,793f09840..4b3bbe2d7
--- a/docs/ui-parity.md
+++ b/docs/ui-parity.md
@@@ -1,6 -1,6 +1,6 @@@
# UI parity: tools, handles, modifiers and feel
- > **Last reviewed:** 2026-10-10 · **Last updated:** 2026-10-14 · **Change:** minor (the wheel steps value fields, #5473; smart filter reordering by drag; smart object perspective row corrected to done, #426; Free Transform H/V skew fields; toolbar tool shortcuts can be reassigned; ⇧-dragged guides land on ruler ticks; layer and selection keys; tool keys; spring-loaded tool letters; type formatting keys; Pen Auto Add/Delete, #4144; smart filter rows; stale missing-tool rows corrected: Color Replacement, Red Eye and the Add/Delete Anchor Point pair are live toolbar tools, Frame landed; no percentage changed) · **Target:** Adobe Photoshop 2026
-> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-10-15 · **Change:** minor (Pen Auto Add/Delete on the path being drawn, #6140; Show Transform Controls frames every selected layer; guide keys and clicks; menu bar from the keyboard, #4988; Crop tool Content-Aware Fill; on-canvas corner radius widgets, TOOL-214-12; Curvature Pen edits the active path; Clip Thumbnails to Layer Bounds; Pen ⇧ 45°; last selected tool restored at launch; Layers panel filter-type dropdown with Kind, Name and Mode, #5048; Free Transform box and marching ants follow the selection, #5297; History: the trash deletes the selected snapshot, rows drag onto the trash, #5324; smart filter reordering by drag; smart object perspective row corrected to done, #426; Free Transform H/V skew fields; toolbar tool shortcuts can be reassigned; ⇧-dragged guides land on ruler ticks; layer and selection keys; tool keys; spring-loaded tool letters; type formatting keys; Pen Auto Add/Delete, #4144; smart filter rows; stale missing-tool rows corrected: Color Replacement, Red Eye and the Add/Delete Anchor Point pair are live toolbar tools, Frame landed; no percentage changed) · **Target:** Adobe Photoshop 2026
++> **Last reviewed:** 2026-10-10 · **Last updated:** 2026-10-17 · **Change:** minor (the wheel steps value fields, #5473; Pen Auto Add/Delete on the path being drawn, #6140; Show Transform Controls frames every selected layer; guide keys and clicks; menu bar from the keyboard, #4988; Crop tool Content-Aware Fill; on-canvas corner radius widgets, TOOL-214-12; Curvature Pen edits the active path; Clip Thumbnails to Layer Bounds; Pen ⇧ 45°; last selected tool restored at launch; Layers panel filter-type dropdown with Kind, Name and Mode, #5048; Free Transform box and marching ants follow the selection, #5297; History: the trash deletes the selected snapshot, rows drag onto the trash, #5324; smart filter reordering by drag; smart object perspective row corrected to done, #426; Free Transform H/V skew fields; toolbar tool shortcuts can be reassigned; ⇧-dragged guides land on ruler ticks; layer and selection keys; tool keys; spring-loaded tool letters; type formatting keys; Pen Auto Add/Delete, #4144; smart filter rows; stale missing-tool rows corrected: Color Replacement, Red Eye and the Add/Delete Anchor Point pair are live toolbar tools, Frame landed; no percentage changed) · **Target:** Adobe Photoshop 2026
How PhotoCraft's direct manipulation compares with Photoshop 2026 (27.11.0): the toolbox, the
handles and modifier keys of each gesture, nudging, snapping, numeric precision, navigation,
@@@ -218,7 -227,8 +228,9 @@@ Paragraph; the rest open as in-app floa
| Date | Change | Summary |
|---|---|---|
- | 2026-10-14 | minor | The wheel steps value fields: a focused field takes it wherever the pointer is (the canvas and panels don't scroll), an unfocused one only a gesture that starts over it (#5473, #4061); no percentage changed |
++| 2026-10-17 | minor | The wheel steps value fields: a focused field takes it wherever the pointer is (the canvas and panels don't scroll), an unfocused one only a gesture that starts over it (#5473, #4061); no percentage changed |
+ | 2026-10-13 | minor | Menu bar from the keyboard: Alt / F10 focus, Alt+letter, underlined mnemonics (#4988) |
+ | 2026-10-13 | minor | Layers panel filter row: Kind is a real dropdown with Kind, Name and Mode filters, drivable by `ui.set {layerFilter}` (#5048); row added as partial |
| 2026-10-13 | minor | Stale "missing tool" rows corrected against main: Color Replacement (`paint.colorReplacement`), Red Eye (`paint.redEye`) and Add/Delete Anchor Point (the P flyout cycle) are live toolbar tools, so only Art History Brush is missing; no percentage or estimate changed |
| 2026-10-13 | minor | Smart object perspective (non-affine) corrected to done: #426 landed four-corner placements with PSD round trip; scorecard FILE-215-6 flipped |
| 2026-10-10 | major | First version, from a source audit against Photoshop 2026 27.11.0's shortcuts file and the open issues |