Skip to content

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

Merge PR #5566: fix(ui): keep Character and Paragraph defaults editable before typing

aionggda305e0c7d71
diff --cc crates/ui-egui/src/tool_reset.rs
index dfe7abf10,049a4ad5d..82109cfbc
--- a/crates/ui-egui/src/tool_reset.rs
+++ b/crates/ui-egui/src/tool_reset.rs
@@@ -182,21 -143,20 +182,23 @@@ pub fn option_keys(tool: Tool) -> &'sta
),
Tool::PerspectiveCrop => reset!(crop_width, crop_height, crop_resolution, crop_resolution_unit, perspective_crop_grid),
Tool::Eyedropper => reset!(eyedropper_size, eyedropper_sample, eyedropper_ring),
- Tool::Pencil => reset!(pencil_auto_erase),
+ Tool::Brush => reset!(brush_clear),
+ Tool::Pencil => reset!(pencil_auto_erase, pencil_clear),
+ Tool::Eraser => reset!(eraser_mode),
+ Tool::Remove => reset!(remove_new_layer, remove_after_each_stroke),
Tool::BackgroundEraser => reset!(bg_sampling, bg_limits, bg_tolerance, bg_protect_fg),
Tool::ColorReplacement => reset!(cr_mode, cr_sampling, cr_limits, cr_tolerance, cr_anti_alias),
- Tool::MagicEraser => reset!(tolerance, anti_alias, contiguous, sample_all_layers, magic_eraser_opacity),
+ Tool::MagicEraser => reset!(tolerance, anti_alias, contiguous, magic_eraser_opacity),
Tool::Gradient => reset!(gradient_style, gradient_reverse, gradient_dither, gradient_classic, gradient_blend_mode, fill_opacity),
- Tool::PaintBucket => reset!(bucket_fill_pattern, fill_opacity, tolerance, anti_alias, contiguous, sample_all_layers),
+ Tool::PaintBucket => reset!(bucket_fill_pattern, fill_opacity, tolerance, anti_alias, contiguous),
- Tool::Type | Tool::VerticalType | Tool::HorizontalTypeMask | Tool::VerticalTypeMask => reset!(type_font, type_style, type_size, type_aa, type_align),
+ Tool::Type | Tool::VerticalType | Tool::HorizontalTypeMask | Tool::VerticalTypeMask => {
+ reset!(type_font, type_style, type_size, type_aa, type_align, type_style_defaults)
+ }
Tool::Zoom => reset!(zoom_scrubby),
- Tool::SpotHealing => reset!(spot_type, sample_all_layers),
+ Tool::SpotHealing => reset!(spot_type),
Tool::Healing => reset!(clone_aligned, clone_sample),
- Tool::Patch => reset!(patch_mode, patch_content_aware, patch_structure, patch_color, sample_all_layers),
- Tool::ContentAwareMove => reset!(cam_mode, cam_structure, cam_color, sample_all_layers),
+ Tool::Patch => reset!(patch_mode, patch_content_aware, patch_structure, patch_color),
+ Tool::ContentAwareMove => reset!(cam_mode, cam_structure, cam_color, cam_transform_on_drop),
Tool::RedEye => reset!(red_eye_pupil_size, red_eye_darken),
Tool::CloneStamp => reset!(clone_aligned, clone_sample),
Tool::PatternStamp => reset!(pattern_stamp_aligned, pattern_stamp_impressionist, pattern_stamp_scale, pattern_stamp_angle),
diff --cc crates/ui-egui/src/type_tool.rs
index b2004c95a,27a6d495e..4aea078b8
--- a/crates/ui-egui/src/type_tool.rs
+++ b/crates/ui-egui/src/type_tool.rs
@@@ -2430,12 -2233,10 +2552,12 @@@ pub fn character_panel(app: &mut Photoc
/// The Character and/or Paragraph sections, with the shared collapsible headers and fields that
/// fill the panel width (#155).
- fn type_sections(app: &mut PhotocraftApp, ui: &mut egui::Ui, character: bool, paragraph: bool) {
+ fn type_sections(app: &mut PhotocraftApp, ui: &mut egui::Ui, character: bool, paragraph: bool, show_defaults: bool) {
use crate::props_layout::{COL_GAP, LABEL_GAP, LABEL_W, field_width, section};
use crate::theme::ROW_GAP;
- let Some((c, para)) = styles_at(app) else { return };
+ let Some((c, para)) = styles_at(app).or_else(|| show_defaults.then(|| default_styles(app))) else { return };
+ // Preferences ▸ Units & Rulers ▸ Type, as in the options bar: the model keeps points.
+ let (u, unit) = type_unit(app);
let t = crate::theme::Tokens::get(ui.ctx());
// Row helper: `ui.horizontal` with the column gap, then the shared row gap.
let row = |ui: &mut egui::Ui, add: &mut dyn FnMut(&mut egui::Ui)| {
diff --cc docs/gaps.md
index 3342a0d54,bf793af8e..bd00fe23d
--- a/docs/gaps.md
+++ b/docs/gaps.md
@@@ -204,15 -190,15 +204,18 @@@ what an agent can't finish alone
- **Estimate:** 60–110 h.
### G9. Panels, preferences and workspace
+- **Progress (2026-10-15):** Preferences › General › Animated Zoom takes effect: a held Zoom
+ tool press zooms continuously about the press point, ⌥ out (#6210, `ui-egui/src/zoom_hold.rs`).
+ - **Progress (2026-10-14, #5556):** Character and Paragraph controls stay available without
+ a type target, editing persisted Type tool defaults inherited by new text. Formatting existing
+ selected text keeps its current command and undo scope. Other panel gaps remain open.
- **Progress (2026-10-12):** toolbar tool shortcuts can be reassigned, removed and reset (#4086),
with saved bindings, matching toolbar hints and regression coverage (`ui-egui/src/tool_shortcuts.rs`).
-- **Missing:** 27 of 156 preferences do nothing (scorecard prefs audit); panel groups can't
+- **Missing:** 24 of 171 preferences do nothing (scorecard prefs audit, 2026-10-15: Save in
+ Background now takes effect, #6207); panel groups can't
float or tear off into OS windows (UI-217-5, #1828, #1213, #2305); Color panel lacks wheel and
- slider modes (UI-217-17, #2569); more themes (UI-217-11, #2661); layer clipboard
- (UI-217-23, #2670); tool-specific context menus beyond brushes, selections and Pen
+ slider modes (UI-217-17, #2569); more themes (UI-217-11, #2661); a single pixel layer
+ copies without its mask and styles (UI-217-23; fill and adjustment layers copy whole, #2344); tool-specific context menus beyond brushes, selections and Pen
([context-menu-parity.md](context-menu-parity.md)); Libraries, Comments, Contextual Task Bar
panels.
- **Estimate:** 150–250 h.
@@@ -290,32 -265,8 +293,33 @@@
| Date | Change | Summary |
|---|---|---|
+| 2026-10-15 | minor | G1 / #5972 A1: render only provably constant-RGB `GdFl` noise fills; variable noise synthesis remains open |
+| 2026-10-18 | minor | G9: with no selection, Copy takes fill and adjustment layers whole and Paste recreates them (#2344); UI-217-23 stays partial (a single pixel layer copies its pixels only); estimate unchanged |
+| 2026-10-15 | minor | G2: a cancelled 24 MP Gaussian Blur job stops within 44 ms max (P25, budget 200 ms; was about 400 ms; local runs, baseline not re-run), the uncancelled job on a locked-transparency layer about 40% faster; #6205 |
+| 2026-10-15 | minor | G9: Animated Zoom preference takes effect (hold the Zoom tool to zoom continuously, #6210); prefs that do nothing 25 of 166; no estimate changed |
+| 2026-10-16 | minor | G7: Content-Aware Move's live preview covers every selection the command takes (over 256 × 256: a coarse result solved scaled down, then the exact one); TOOL-213-4 done (#6680) |
+| 2026-10-15 | minor | G9: Save in Background off saves in the foreground under a modal progress dialog (#6207); preferences that do nothing 25 → 24 of 169 |
+| 2026-10-14 | minor | G1: a PSD smart object's filter mask shows when the file opens (Photoshop stores the filtered pixels unmasked); export stores them that way too; Photoshop-oracle floor 185 → 188 of 258 |
+| 2026-10-13 | minor | G14: D90 image area measured (4288 × 2848 at (10, 10)); gap remains open |
+| 2026-10-14 | minor | Corpus floors raised to the measured results of the CMYK, Lab, 32-bit, Levels, Threshold, Posterize, feather and pass-through fixes landed together: Photoshop-authored 165 → 185 of 258, io 146 → 148 of 170, psd-tools 242 → 249 of 309 |
+| 2026-10-13 | minor | G1: generated large-file fixtures (20 MP, 150 layers, 2 GB PSD, 4.38 GB PSB) round-trip in io tests/large_files.rs; the 4.38 GB PSB opens on Windows through io (#375 evidence); FILE-216-2 done (#5107) |
+| 2026-10-13 | minor | G1: CMYK Hue/Saturation and Color Balance work on C, M and Y as inverted RGB with black kept, as Photoshop does; cmyk hue-saturation 100% → 0.4–0.7% bad pixels, color-balance 74% → 25%; floor unchanged |
+| 2026-10-13 | minor | G1: CMYK Posterize works on the stored values (1 − ink); psd-tools posterize_cmyk passes; psd-tools floor → 242 of 309 |
+| 2026-10-13 | minor | G1: CMYK stacks with Invert, Posterize, Threshold, Brightness/Contrast, Levels or Curves layers composite on the document's own inks (14 CMYK oracles pass); Photoshop-oracle floor 151 → 165 of 258 |
+| 2026-10-13 | minor | CMYK Threshold compares the Rec. 601 luma of the inks' plain complement, as Photoshop does (every pixel of cmyk8/16 threshold-128.psd); oracle bad pixels 1.6% → 0.2% |
+| 2026-10-13 | minor | G1: CMYK Brightness/Contrast (modern and legacy) curves each ink's stored value as Photoshop does; oracle bad pixels 71% → 48–57%, floor unchanged |
+| 2026-10-13 | minor | G1: modern Brightness/Contrast's brightness curve refit to Photoshop (six oracles pass); Photoshop-oracle floor 145 → 151 of 258 |
+| 2026-10-13 | minor | G1: Lab documents composite Invert, Posterize, Threshold, Brightness/Contrast and Lab Levels/Curves on their stored L, a, b (no clipped RGB round trip); seven Lab oracles pass; Photoshop-oracle floor 145 → 152 of 258 |
+| 2026-10-13 | minor | G1: Levels round every step to whole levels and use Photoshop's shadow toe (slope 2^gamma); levels_rgb and stack-levels-curves-hue-posterize pass; Photoshop-oracle floor 145 → 146 of 258, psd-tools 236 → 238 of 309 |
+| 2026-10-13 | minor | G1: 32-bit legacy Brightness/Contrast (pivot 127), Channel Mixer (1/1024 steps, constant ×255/512), Photo Filter and Black & White tint unclipped as Photoshop computes them, CPU and GPU; Photoshop-oracle floor 145 → 149 of 258 |
+| 2026-10-13 | minor | G1: mask feathers blur with exactly the feather's variance; psd-tools mask-parameters-no-real-channel passes, layer_mask_data 27 % → 4 % off; psd-tools floor → 240 of 309 |
+| 2026-10-13 | minor | G1: Threshold splits on Photoshop's luminosity of whole samples (8- and 16-bit rules exact on four oracles); psd-tools threshold_rgb and threshold_16bits_rgb pass; psd-tools floor → 241 of 309 |
+| 2026-10-13 | minor | G1: a pass-through group that is a clipping base and holds an adjustment layer renders isolated; psd-tools passthrough_clipping_mask_adjustment passes; psd-tools floor → 240 of 309 |
+| 2026-10-13 | minor | G1: 16-bit Posterize bins the 16-bit sample, as Photoshop does (exact on two oracles); psd-tools floor → 241 of 309 |
+| 2026-10-13 | minor | G1: Gradient Map driven by the W3C luminosity (0.3, 0.59, 0.11), as Photoshop is; rgb8/rgb16 gradient-map pass; Photoshop-oracle floor 145 → 147 of 258 |
+ | 2026-10-14 | minor | G9: Character/Paragraph defaults before creating text (#5556); no percentage or estimate changed |
| 2026-10-13 | minor | G6: stale "missing tool" list corrected against `main` — Color Replacement (`paint.colorReplacement`), Red Eye (`paint.redEye`) and Add/Delete Anchor Point (P flyout, #4144) are live tools, so the toolbox is 67 of 68 and Art History Brush is the only one missing; no percentage or estimate changed |
+| 2026-10-13 | minor | G8: a Type tool click on the work path or the active shape layer's path starts type on it at the point clicked (TYPE-218-1, partial); no readiness percentage or estimate changed |
| 2026-10-13 | minor | G4: Hue Jitter amount-track appearance (#3825, partial); no readiness percentage or estimate changed |
| 2026-10-13 | minor | G4: minimum inputs in Shape Dynamics and Transfer follow their Control (#3825, partial); no readiness percentage or estimate changed |
| 2026-10-12 | minor | G5: Free Transform options bar H/V skew fields done |
diff --cc docs/ui-parity.md
index 59d05d1e4,c460b0893..5bf778c5f
--- a/docs/ui-parity.md
+++ b/docs/ui-parity.md
@@@ -228,9 -218,7 +229,10 @@@ Paragraph; the rest open as in-app floa
| Date | Change | Summary |
|---|---|---|
+| 2026-10-15 | minor | Shape Density and Feather row added as done (TOOL-214-12, #5846) |
+| 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-14 | minor | Character and Paragraph panels edit persistent defaults without a type target (#5556); no percentage or estimate changed |
| 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 |