PhotoCraft: An open-source, photo editor written by scratch in pure Rust
Merge remote-tracking branch 'upstream/main' into type-recent-fonts
Reynold Hu82be3865a615
diff --cc crates/ui-egui/src/state.rsindex 9884ec681,d464cb3cc..10dc06cda--- a/crates/ui-egui/src/state.rs+++ b/crates/ui-egui/src/state.rs@@@ -1277,8 -1312,9 +1316,10 @@@ impl Default for UiStategroup_tools: Vec::new(),spring: None,recent_files: Vec::new(),+ recent_fonts: Vec::new(),text_edit: None,+ caret_blink_time: 0.0,+ text_edit_return_tool: None,type_transform: None,type_transform_pivot: None,cam_transform: None,diff --cc crates/ui-egui/src/type_font_picker_tests.rsindex 8649f439a,3dfe34ded..3ccdcd59b--- a/crates/ui-egui/src/type_font_picker_tests.rs+++ b/crates/ui-egui/src/type_font_picker_tests.rs@@@ -10,9 -10,9 +10,10 @@@ use photocraft_engine::prefs::FontPrevistruct State {current: String,families: Vec<String>,+ button: egui::Id,popup: egui::Id,preview: FontPreview,+ recents: Vec<String>,}fn harness() -> Harness<'static, State> {@@@ -27,13 -23,13 +28,14 @@@ fn harness_with_recents(preview: FontPr// Enough families that the unfiltered menu hits its maximum height and scrolls.let mut families: Vec<String> = (0..60).map(|i| format!("Family {i:02}")).collect();families.push("Zeta Sans".into());- let state = State { current: "Family 00".into(), families, popup: egui::Id::NULL, preview, recents };- let state = State { current: "Family 00".into(), families, button: egui::Id::NULL, popup: egui::Id::NULL, preview };++ let state = State { current: "Family 00".into(), families, button: egui::Id::NULL, popup: egui::Id::NULL, preview, recents };let mut h = Harness::builder().with_size(vec2(600.0, 900.0)).build_ui_state(|ui, s: &mut State| {- s.popup = ui.make_persistent_id(egui::IdSalt::new("type-font")).with("popup");+ s.button = ui.make_persistent_id(egui::IdSalt::new("type-font"));+ s.popup = s.button.with("popup");let fams = s.families.clone();- font_picker_in(ui, &mut s.current, 170.0, &fams, s.preview);+ let recents = s.recents.clone();+ font_picker_in(ui, &mut s.current, 170.0, &fams, s.preview, &recents);},state,);@@@ -417,9 -484,9 +490,10 @@@ fn localized_font_names_label_the_menu_let state = State {current: "Arial".into(),families: vec!["Arial".into(), "MS Gothic".into(), "Zeta Sans".into()],+ button: egui::Id::NULL,popup: egui::Id::NULL,preview: FontPreview::Medium,+ recents: Vec::new(),};let mut h = Harness::builder().with_size(vec2(600.0, 900.0)).build_ui_state(|ui, s: &mut State| {diff --cc docs/scorecard.mdindex ab4c98be9,3b36e7c61..e36601d56--- a/docs/scorecard.md+++ b/docs/scorecard.md@@@ -6,13 -6,13 +6,13 @@@ Generated by `cargo xtask scorecard` fr| Area | Done | Partial | Missing | Key numbers ||---|---:|---:|---:|---|- | [Performance](#performance) | 3 | 22 | 22 | 56 scenarios: 3 within budget, 22 over budget or failing, 9 tracked only, 17 not run, 5 not measurable yet (baseline 2026-10-05) |- | [File compatibility](#file-compatibility) | 7 | 13 | 7 | io corpus: oracle ≥ 146/170, round trip ≥ 169/170; psd-tools corpus: oracle ≥ 236/309, round trip ≥ 308/309; photoshop oracles: oracle ≥ 145/256, round trip ≥ 258/256 |- | [Tools](#tools) | 29 | 13 | 1 | |- | [Workspace and UI](#workspace-and-ui) | 13 | 6 | 4 | settings that do nothing: 25 of 157 (target 0) |+ | [Performance](#performance) | 3 | 22 | 24 | 58 scenarios: 3 within budget, 22 over budget or failing, 9 tracked only, 19 not run, 5 not measurable yet (baseline 2026-10-05) |+ | [File compatibility](#file-compatibility) | 7 | 14 | 6 | io corpus: oracle ≥ 148/170, round trip ≥ 169/170; psd-tools corpus: oracle ≥ 249/309, round trip ≥ 308/309; photoshop oracles: oracle ≥ 188/256, round trip ≥ 258/256 |+ | [Tools](#tools) | 33 | 11 | 0 | |-| [Workspace and UI](#workspace-and-ui) | 13 | 6 | 4 | settings that do nothing: 26 of 168 (target 0) |++| [Workspace and UI](#workspace-and-ui) | 13 | 6 | 4 | settings that do nothing: 25 of 168 (target 0) || [Type](#type) | 4 | 3 | 2 | || [Automation](#automation) | 5 | 2 | 4 | 631 of 631 menu items live (100.0%) |- | [Reliability](#reliability) | 5 | 2 | 0 | never-crash lints on 28 of 28 crates; panic_hunt present |+ | [Reliability](#reliability) | 5 | 2 | 0 | never-crash lints on 30 of 30 crates; panic_hunt present || [Distribution](#distribution) | 5 | 4 | 2 | || [Open bugs](#open-bugs) | 29 | 2 | 1 | |@@@ -176,9 -179,9 +179,9 @@@ Corpus floors (`crates/io/tests/corpus.## Workspace and UI- **Settings that do nothing: 25 of 157** (target 0, #204). Counted by the prefs audit (`xtask/src/scorecard.rs`): a `Preferences` field counts as read when code outside the prefs model (`prefs.rs` except its `impl Session` blocks; tests excluded; the schema-driven dialog never names a field) accesses `section.field`, or `.section` and `.field` in the same file, or calls a section method that reads `self.field`. It is a heuristic lower bound: a generic name can look read when it isn't.-**Settings that do nothing: 26 of 168** (target 0, #204). Counted by the prefs audit (`xtask/src/scorecard.rs`): a `Preferences` field counts as read when code outside the prefs model (`prefs.rs` except its `impl Session` blocks; tests excluded; the schema-driven dialog never names a field) accesses `section.field`, or `.section` and `.field` in the same file, or calls a section method that reads `self.field`. It is a heuristic lower bound: a generic name can look read when it isn't.++**Settings that do nothing: 25 of 168** (target 0, #204). Counted by the prefs audit (`xtask/src/scorecard.rs`): a `Preferences` field counts as read when code outside the prefs model (`prefs.rs` except its `impl Session` blocks; tests excluded; the schema-driven dialog never names a field) accesses `section.field`, or `.section` and `.field` in the same file, or calls a section method that reads `self.field`. It is a heuristic lower bound: a generic name can look read when it isn't.-Unread: `general.color_picker`, `general.animated_zoom`, `general.zoom_resizes_windows`, `workspace.auto_show_hidden_panels`, `workspace.enable_floating_document_window_docking`, `file_handling.save_in_background`, `performance.cache_levels`, `performance.legacy_compositing`, `scratch_disks.disks`, `units_and_rulers.column_width`, `units_and_rulers.gutter`, `plug_ins.show_extension_panels`, `plug_ins.allow_scripts_to_connect`, `plug_ins.generator_enabled`, `type_.text_engine`, `type_.recent_fonts`, `enhanced_controls.scrubby_slider_acceleration`, `enhanced_controls.touch_gestures`, `raw_defaults.color_space`, `raw_defaults.bit_depth`, `raw_defaults.resolution`, `raw_defaults.sharpen_for`, `raw_defaults.open_as_smart_object`, `raw_defaults.apply_auto_tone`, `integrations.allow_agent_control`, `integrations.control_port`.+Unread: `general.color_picker`, `general.animated_zoom`, `general.zoom_resizes_windows`, `workspace.auto_show_hidden_panels`, `workspace.enable_floating_document_window_docking`, `file_handling.save_in_background`, `performance.cache_levels`, `performance.legacy_compositing`, `scratch_disks.disks`, `units_and_rulers.column_width`, `units_and_rulers.gutter`, `plug_ins.show_extension_panels`, `plug_ins.allow_scripts_to_connect`, `plug_ins.generator_enabled`, `type_.text_engine`, `enhanced_controls.scrubby_slider_acceleration`, `enhanced_controls.touch_gestures`, `raw_defaults.color_space`, `raw_defaults.bit_depth`, `raw_defaults.resolution`, `raw_defaults.sharpen_for`, `raw_defaults.open_as_smart_object`, `raw_defaults.apply_auto_tone`, `integrations.allow_agent_control`, `integrations.control_port`.| Id | Target | Status | Issue | Note ||---|---|---|---|---|