PhotoCraft: An open-source, photo editor written by scratch in pure Rust
feat(ui): keep a brush per painting tool, as in Photoshop (#218)
Adam Gincel35c323c9de90
diff --git a/crates/ui-egui/src/canvas.rs b/crates/ui-egui/src/canvas.rsindex 40cac5430..bb7bcfa04 100644--- a/crates/ui-egui/src/canvas.rs+++ b/crates/ui-egui/src/canvas.rs@@ -2293,7 +2293,7 @@ pub fn canvas_view(app: &mut PhotocraftApp, ui: &mut egui::Ui, idx: usize, rect:let mods = ui.input(|i| i.modifiers);// Tools follow the left button; the right one opens the Brush Preset picker or erases// (Preferences › Tools, `paint_mouse`).- crate::paint_mouse::sync_tool_smoothing(app);+ crate::paint_mouse::sync_tool_brush(app);let mut buttons = crate::paint_mouse::canvas_buttons(app, &response, tool);// The Crop tool's frame is edited from the press (before egui's drag threshold), so the// pixels past the canvas show at once, as in Photoshop.@@ -3411,7 +3411,7 @@ pub fn tool_event(app: &mut PhotocraftApp, ev: ToolEvent, mods: egui::Modifiers)Tool::Type | Tool::VerticalType if crate::type_tool::pointer_down(app, x, y, mods.shift) => return,_ => {}}- crate::paint_mouse::sync_tool_smoothing(app);+ crate::paint_mouse::sync_tool_brush(app);let erase = tool == Tool::Eraser || std::mem::take(&mut app.secondary_erase);// ⇧-click after a stroke: a straight line from where it ended (stroke_constraint.rs).let active = app.session.active().map(|st| st.doc.id);diff --git a/crates/ui-egui/src/control.rs b/crates/ui-egui/src/control.rsindex 2e682504c..74a3df96e 100644--- a/crates/ui-egui/src/control.rs+++ b/crates/ui-egui/src/control.rs@@ -375,6 +375,9 @@ fn dispatch(app: &mut PhotocraftApp, ctx: &egui::Context, req: &ControlRequest)// Apply (nothing below can fail).if let Some(t) = tool {app.ui.tool = t;+ // Each tool keeps its own brush (#218), so switch it in before `brushSize`+ // below sets the new tool's size.+ crate::paint_mouse::sync_tool_brush(app);}let gradient_before = app.ui.tool_options.clone();if let Some(mode) = gradient_blend {@@ -1088,6 +1091,16 @@ mod tests {assert_eq!(app.session.journal.len(), journal_len);}+ // Each tool keeps its own brush (#218), so `tool` + `brushSize` in one call sets the new+ // tool's size rather than the one it was carrying.+ call(&mut app, &ctx, "ui.set", json!({"tool": "eraser", "brushSize": 12.0}));+ assert_eq!(app.session.tools.brush.size, 12.0, "the Eraser's own size");+ call(&mut app, &ctx, "ui.set", json!({"tool": "brush"}));+ assert_eq!(app.session.tools.brush.size, 42.5, "the Brush gets its own back");+ call(&mut app, &ctx, "ui.set", json!({"tool": "eraser"}));+ assert_eq!(app.session.tools.brush.size, 12.0);+ call(&mut app, &ctx, "ui.set", json!({"tool": "brush", "brushSize": 42.5}));+// Values that cannot be represented by BrushSettings must report the command error and// leave both the brush and journal unchanged instead of mutating tool state directly.let journal_len = app.session.journal.len();diff --git a/crates/ui-egui/src/lib.rs b/crates/ui-egui/src/lib.rsindex e157518e9..32b8535ad 100644--- a/crates/ui-egui/src/lib.rs+++ b/crates/ui-egui/src/lib.rs@@ -1128,6 +1128,9 @@ impl eframe::App for PhotocraftApp {return;}let t0 = gpu_canvas::now_ms();+ // Each painting tool keeps its own brush (#218), so switch the active tool's brush in+ // before anything this frame reads it (the cursor, the options bar, a stroke).+ paint_mouse::sync_tool_brush(self);// View › Screen Mode › Full Screen Mode: only the image, on black (F or Esc returns).screen_picker::show(&ctx);if screen_picker::busy(&ctx) && screen_picker::showing(&ctx) {diff --git a/crates/ui-egui/src/paint_mouse.rs b/crates/ui-egui/src/paint_mouse.rsindex dade80920..e983f907f 100644--- a/crates/ui-egui/src/paint_mouse.rs+++ b/crates/ui-egui/src/paint_mouse.rs@@ -6,37 +6,54 @@use egui::{PointerButton, Response};use photocraft_engine::prefs::RightClickPaint;+use photocraft_engine::BrushSettings;use crate::PhotocraftApp;use crate::state::Tool;-/// Smoothing is a tool option, kept per tool like Photoshop's options bar: switching between the-/// Brush and the Eraser saves the session brush's smoothing for the old tool and loads the new-/// tool's (Photoshop's 10 % the first time). Other tools leave it alone.-pub fn sync_tool_smoothing(app: &mut PhotocraftApp) {+/// The brush is a tool option, kept per tool like Photoshop's options bar: switching from the+/// Brush to the Eraser saves the session brush for the old tool and loads the new tool's, so each+/// keeps its own size, hardness, mode, opacity, dynamics and smoothing. A tool seen for the+/// first time takes what the brush already has, at Photoshop's 10 % smoothing. Other tools leave+/// the brush alone.+///+/// The foreground and background colours, the erase flag and the stroke seed belong to the+/// session rather than to the tool, so a swap never carries them between tools: picking a colour+/// or painting with the Eraser works with any tool's brush.+pub fn sync_tool_brush(app: &mut PhotocraftApp) {let tool = app.ui.tool;- if !matches!(tool, Tool::Brush | Tool::Pencil | Tool::Eraser) || app.ui.smoothing_tool == Some(tool) {+ if !has_brush_picker(tool) || app.ui.brush_tool == tool {return;}- let current = app.session.tools.brush.smoothing.clone();- let next = match app.ui.smoothing_tool {- // The first smoothing tool takes what the brush has.- None => current,- Some(prev) => {- let saved = &mut app.ui.tool_smoothing;- match saved.iter_mut().find(|(t, _)| *t == prev) {- Some(e) => e.1 = current,- None => saved.push((prev, current)),- }- saved- .iter()- .find(|(t, _)| *t == tool)- .map(|(_, s)| s.clone())- .unwrap_or_else(|| photocraft_engine::paint::brush::Smoothing { amount: 0.1, ..Default::default() })- }+ // The live brush is the outgoing tool's, so save it there before the new one takes over: any+ // edit it made since it was last active is in it, so its copy never goes stale.+ let current = app.session.tools.brush.clone();+ save_brush(app, app.ui.brush_tool, current.clone());+ app.session.tools.brush = match app.ui.tool_brushes.iter().find(|(t, _)| *t == tool) {+ Some((_, b)) => session_fields(¤t, b),+ // A tool seen for the first time takes what the brush has, at Photoshop's smoothing.+ None => BrushSettings { smoothing: first_smoothing(), ..current },};- app.session.tools.brush.smoothing = next;- app.ui.smoothing_tool = Some(tool);+ app.ui.brush_tool = tool;+}++/// The brush `tool` had when it was last active.+fn save_brush(app: &mut PhotocraftApp, tool: Tool, brush: BrushSettings) {+ match app.ui.tool_brushes.iter_mut().find(|(t, _)| *t == tool) {+ Some(e) => e.1 = brush,+ None => app.ui.tool_brushes.push((tool, brush)),+ }+}++/// The session's own brush fields, which a tool swap never carries: the colours, the erase flag+/// and the stroke seed (a stroke's replay seed is the command's, not the tool's).+fn session_fields(current: &BrushSettings, brush: &BrushSettings) -> BrushSettings {+ BrushSettings { color: current.color, background: current.background, erase: current.erase, seed: current.seed, ..brush.clone() }+}++/// Photoshop's 10 % stroke smoothing, what a tool's brush starts at.+fn first_smoothing() -> photocraft_engine::paint::brush::Smoothing {+ photocraft_engine::paint::brush::Smoothing { amount: 0.1, ..Default::default() }}/// Which tool events this frame's canvas response produces.@@ -460,12 +477,12 @@ mod tests {}#[test]- fn smoothing_is_a_per_tool_option_that_presets_keep() {+ fn the_brush_is_a_per_tool_option_that_presets_keep() {let mut app = PhotocraftApp::new(photocraft_engine::Session::new(), crate::Services::default());app.run("file.new", json!({"width": 64, "height": 64})).unwrap();let amount = |app: &PhotocraftApp| app.session.tools.brush.smoothing.amount;app.ui.tool = Tool::Brush;- sync_tool_smoothing(&mut app);+ sync_tool_brush(&mut app);assert_eq!(amount(&app), 0.1, "Photoshop's default");// Picking a preset (whose own smoothing is 0) keeps the tool's smoothing.let preset = app.session.tools.presets.iter().find(|p| p.brush.smoothing.amount == 0.0).map(|p| p.name.clone()).unwrap();@@ -478,23 +495,87 @@ mod tests {assert_eq!((amount(&app), app.session.tools.brush.smoothing.pulled_string), (0.42, true));// The Eraser has its own (10 % at first); switching back restores the Brush's.app.ui.tool = Tool::Eraser;- sync_tool_smoothing(&mut app);+ sync_tool_brush(&mut app);assert_eq!(amount(&app), 0.1);app.session.tools.brush.smoothing.amount = 0.0;app.ui.tool = Tool::Brush;- sync_tool_smoothing(&mut app);+ sync_tool_brush(&mut app);assert_eq!((amount(&app), app.session.tools.brush.smoothing.pulled_string), (0.42, true));// Other tools leave it alone; the Eraser kept its 0 %.app.ui.tool = Tool::Move;- sync_tool_smoothing(&mut app);+ sync_tool_brush(&mut app);assert_eq!(amount(&app), 0.42);app.ui.tool = Tool::Eraser;- // A stroke picks up the tool's smoothing even without a frame in between.+ // A stroke picks up the tool's brush even without a frame in between.tool_event(&mut app, ToolEvent::Down { x: 5.0, y: 5.0, pressure: 1.0 }, Modifiers::NONE);assert_eq!(amount(&app), 0.0);tool_event(&mut app, ToolEvent::Up { x: 30.0, y: 5.0 }, Modifiers::NONE);}+ /// #218: Photoshop keeps a brush per painting tool, so the size, hardness, mode, opacity and+ /// dynamics of one tool never leak into another's, and each tool gets its own back.+ #[test]+ fn each_tool_keeps_its_own_brush() {+ let mut app = PhotocraftApp::new(photocraft_engine::Session::new(), crate::Services::default());+ app.run("file.new", json!({"width": 64, "height": 64})).unwrap();+ let brush = |app: &PhotocraftApp| app.session.tools.brush.clone();+ let size = |b: &BrushSettings| b.size;+ let hardness = |b: &BrushSettings| b.hardness;+ let opacity = |b: &BrushSettings| b.opacity;+ let mode = |b: &BrushSettings| b.mode;++ app.ui.tool = Tool::Brush;+ sync_tool_brush(&mut app);+ app.run("tools.setBrush", json!({"brush": {"size": 40, "hardness": 0.2, "opacity": 0.7, "mode": "Multiply"}})).unwrap();+ assert_eq!(size(&brush(&app)), 40.0);++ // A tool seen for the first time starts from the brush the old tool left (Photoshop's+ // 10 % smoothing), so nothing is lost by switching.+ app.ui.tool = Tool::Eraser;+ sync_tool_brush(&mut app);+ assert_eq!(size(&brush(&app)), 40.0, "a new tool inherits the current brush");++ // The Eraser edits its own size; the Brush keeps 40 px.+ app.run("tools.setBrush", json!({"brush": {"size": 8, "hardness": 1.0}})).unwrap();+ app.ui.tool = Tool::Brush;+ sync_tool_brush(&mut app);+ assert_eq!(size(&brush(&app)), 40.0, "the Brush keeps its own size");+ assert_eq!(hardness(&brush(&app)), 0.2, "and its hardness");+ app.ui.tool = Tool::Eraser;+ sync_tool_brush(&mut app);+ assert_eq!(size(&brush(&app)), 8.0, "the Eraser keeps its own size");+ assert_eq!(hardness(&brush(&app)), 1.0, "and its hardness");++ // Mode, opacity, flow and the dynamics sections are per tool too.+ app.ui.tool = Tool::CloneStamp;+ sync_tool_brush(&mut app);+ app.run("tools.setBrush", json!({"brush": {"mode": "Screen", "opacity": 0.3}})).unwrap();+ app.ui.tool = Tool::Brush;+ sync_tool_brush(&mut app);+ assert_eq!((mode(&brush(&app)), opacity(&brush(&app))), (photocraft_color::BlendMode::Multiply, 0.7), "the Brush's own mode and opacity");+ app.ui.tool = Tool::CloneStamp;+ sync_tool_brush(&mut app);+ assert_eq!((mode(&brush(&app)), opacity(&brush(&app))), (photocraft_color::BlendMode::Screen, 0.3), "the Clone Stamp keeps its own");++ // The colours, the erase flag and the seed belong to the session, so a swap keeps what is+ // live now instead of restoring another tool's copy (a picked colour reaches every tool).+ app.run("tools.setBrush", json!({"brush": {"color": [0.0, 1.0, 0.0, 1.0], "background": [1.0, 0.0, 1.0, 1.0], "erase": true, "seed": 42}})).unwrap();+ app.ui.tool = Tool::Brush;+ sync_tool_brush(&mut app);+ let b = brush(&app);+ assert_eq!(+ (b.color, b.background, b.erase, b.seed),+ ([0.0, 1.0, 0.0, 1.0], [1.0, 0.0, 1.0, 1.0], true, 42),+ "the session's own brush fields survive the swap"+ );++ // Tools with no brush of their own (the Move) leave the brush alone.+ let before = brush(&app);+ app.ui.tool = Tool::Move;+ sync_tool_brush(&mut app);+ assert_eq!(brush(&app), before);+ }+#[test]fn eraser_tool_on_the_background_paints_the_background_colour() {// #76: the Eraser on the Background (locked transparency) paints the background colour.diff --git a/crates/ui-egui/src/panels.rs b/crates/ui-egui/src/panels.rsindex 58e380d22..e24db05ed 100644--- a/crates/ui-egui/src/panels.rs+++ b/crates/ui-egui/src/panels.rs@@ -513,6 +513,9 @@ pub fn options_bar(app: &mut PhotocraftApp, ui: &mut egui::Ui) {return;}let tool = app.ui.tool;+ // The options bar shows the active tool's brush: switch it in before drawing the+ // chip, so a tool change swaps the brush with it (Photoshop keeps one per tool).+ crate::paint_mouse::sync_tool_brush(app);// Brush edits here go through `tools.setBrush`, one journal entry per gesture (Rule 1).if (tool.is_brushlike() && !matches!(tool, Tool::Brush | Tool::Pencil | Tool::MixerBrush | Tool::Eraser)) || tool == Tool::QuickSelection {brush_preset_chip(ui, &app.session.tools.brush, &mut app.ui);@@ -527,7 +530,6 @@ pub fn options_bar(app: &mut PhotocraftApp, ui: &mut egui::Ui) {{return;}- crate::paint_mouse::sync_tool_smoothing(app);let brush_before = app.session.tools.brush.clone();let mut brush = brush_before.clone();let b = &mut brush;diff --git a/crates/ui-egui/src/pencil_tests.rs b/crates/ui-egui/src/pencil_tests.rsindex 995f3ffc8..53cce1217 100644--- a/crates/ui-egui/src/pencil_tests.rs+++ b/crates/ui-egui/src/pencil_tests.rs@@ -13,8 +13,12 @@ fn app() -> PhotocraftApp {let mut app = PhotocraftApp::new(photocraft_engine::Session::new(), Default::default());app.run("file.new", json!({"width": 120, "height": 80, "background": "transparent"})).unwrap();app.run("tools.setColors", json!({"foreground": "#000000", "background": "#ffffff"})).unwrap();- app.run("tools.setBrush", json!({"brush": {"size": 3, "hardness": 0.0, "smoothing": {"amount": 0.0}}})).unwrap();+ app.run("tools.setBrush", json!({"brush": {"size": 3, "hardness": 0.0}})).unwrap();+ // Each tool keeps its own brush (#218): switch first, then set the Pencil's options, as the+ // options bar does (its first frame takes the Brush's tip at Photoshop's 10 % smoothing).app.ui.tool = Tool::Pencil;+ crate::paint_mouse::sync_tool_brush(&mut app);+ app.run("tools.setBrush", json!({"brush": {"smoothing": {"amount": 0.0}}})).unwrap();app}diff --git a/crates/ui-egui/src/preset_panels.rs b/crates/ui-egui/src/preset_panels.rsindex 6e9e61aa3..d3c35bc10 100644--- a/crates/ui-egui/src/preset_panels.rs+++ b/crates/ui-egui/src/preset_panels.rs@@ -813,6 +813,12 @@ pub fn select_tool_preset(app: &mut PhotocraftApp, name: &str) {let Some(r) = run(app, "tool.presets.select", json!({"preset": name})) else { return };if let Some(tool) = r["tool"].as_str().and_then(Tool::from_name) {app.ui.tool = tool;+ // Each tool keeps its own brush (#218), so switch it in before the preset's brush lands+ // on it, and re-apply the brush the command just set for the old tool.+ crate::paint_mouse::sync_tool_brush(app);+ if let Some(b) = r["options"].get("brush").filter(|b| b.is_object()) {+ let _ = app.run("tools.setBrush", json!({"brush": b}));+ }}if let Some(o) = r["options"].get("toolOptions").and_then(Value::as_object) {let mut cur = serde_json::to_value(&app.ui.tool_options).unwrap_or_default();diff --git a/crates/ui-egui/src/state.rs b/crates/ui-egui/src/state.rsindex e20f79e9f..b34217b33 100644--- a/crates/ui-egui/src/state.rs+++ b/crates/ui-egui/src/state.rs@@ -552,6 +552,11 @@ fn fifty() -> f32 {50.0}+/// The session brush starts out as the Brush's (the tool the app opens with).+fn default_brush_tool() -> Tool {+ Tool::Brush+}+impl Default for ToolOptions {fn default() -> Self {Self {@@ -809,12 +814,13 @@ pub struct UiState {/// Selection-tool context menu opened by a plain canvas right-click.#[serde(default)]pub canvas_tool_menu: Option<crate::canvas_tool_menu::CanvasToolMenu>,- /// Smoothing is a per-tool option (Brush and Eraser each keep theirs): the tool whose- /// smoothing the session brush holds, and the other tools' saved values.- #[serde(default)]- pub smoothing_tool: Option<Tool>,+ /// The brush is a per-tool option (the Brush, the Eraser and every retouching tool each keep+ /// their own size, hardness, tip and dynamics, as in Photoshop): the tool whose brush the+ /// session brush holds, and the other tools' saved brushes.+ #[serde(default = "default_brush_tool")]+ pub brush_tool: Tool,#[serde(default)]- pub tool_smoothing: Vec<(Tool, photocraft_engine::paint::brush::Smoothing)>,+ pub tool_brushes: Vec<(Tool, photocraft_engine::paint::BrushSettings)>,/// Pen path under construction.#[serde(default)]pub pen: Option<crate::vector_ui::PenPath>,@@ -935,8 +941,8 @@ impl Default for UiState {brush_picker_list: crate::brush_picker::list_state(),layer_menu: None,canvas_tool_menu: None,- smoothing_tool: None,- tool_smoothing: Vec::new(),+ brush_tool: Tool::Brush,+ tool_brushes: Vec::new(),clone_source: None,clone_offset: None,pattern_stamp_phase: None,diff --git a/docs/control-protocol.md b/docs/control-protocol.mdindex 631cc4e98..86110fcf4 100644--- a/docs/control-protocol.md+++ b/docs/control-protocol.md@@ -42,6 +42,7 @@ The transport is `apps/photocraft/src/control_server.rs`, and the handlers are i- `ui.set {tool?, panels?, dockTabs?, dock?, dockWidth?, colorPanel?, maskTarget?, vectorMaskTarget?, selectionMode?, zoom?, center?, fit?, theme?, brushSize?, brushSection?, brushTab?, brushesView?}`: change UI state; any other field is an error, checked before anything changes (`theme` is `pro`, `proMedium`, `studio`, `studioLight` or `classic`; `selectionMode` is the selection tools' options-bar mode, 0 New, 1 Add, 2 Subtract, 3 Intersect; `brushSection` indexes the Brush Settings sections, `brushTab` 0 = Brush Settings, 1 = Brushes; `dock` is `{order: ["layers", …], heights: {"properties": 180}, collapsed: ["color"]}`, the right-dock groups top to bottom, their heights in points and the groups collapsed to their tab strip; `dockWidth` sets the right dock width in points, clamped to 250..520; `colorPanel` is `{background}`, whether the Color panel edits the background colour)- `ui.menu.invoke {id, wait?}` / `ui.menu.list`: activate a menu item by id; list the menu tree. A menu item that starts a background job (a filter without a dialog, such as Blur More) replies with the job's result once it has been applied; with `"wait": false` the reply is `{job, pending: true}` at once- `ui.set` also accepts `gradientBlendMode` (a layer blend mode name, such as `Difference`) and `gradientClassic` (boolean) for the Gradient tool options bar.+- Each painting tool keeps its own brush, as in Photoshop: `tools.setBrush` and `ui.set {brushSize}` change the active tool's brush, and switching tools swaps in that tool's own (size, hardness, mode, opacity, flow, dynamics, smoothing). A tool used for the first time starts from the brush in hand. The colours, the erase flag and the stroke seed stay shared. So `ui.set {tool: "eraser", brushSize: 12}` sets the Eraser's size, and `ui.set {tool: "brush"}` afterwards brings the Brush's own size back.Both gradient modes use the current preset, including its opacity stops. Select `Foreground to Transparent` through `gradient.presets.select`, or pass custom `stops` and `transparency: [[0,100],[1,0]]` (location 0..1, opacity 0..100). Use `applyToLayer: false` to edit only the tool preset. Classic gradient drags dispatch `paint.gradient` without overriding them.- `ui.dialog.open {kind, fields?}` (kinds `newDocument`, `about`, `layerStyle {effect?}`, `colorPicker {target: foreground|background}`, `command {command}`) / `ui.dialog.set {dialog, field, value}` / `ui.dialog.confirm {dialog, wait?}` / `ui.dialog.cancel {dialog}`. Like `ui.menu.invoke`, `ui.dialog.confirm` waits for a background job its command starts (a filter dialog's OK) and replies with the result; `"wait": false` replies `{job, pending: true}` at once- Layer Style (`layerStyle {effect?}` opens on that effect kind): the fields hold the dialog's whole state, so agents read and drive it like a user. `effects` lists every effect instance in the layer's order as `{id, kind, on, params, fx}` (`fx` is the effect snapshot the dialog loaded; OK edits that snapshot with `params`, so anything the dialog doesn't model survives). `selected` picks the page (`blendingOptions` or an instance id), `preview` (default on) gates the live canvas preview, `p:blendingOptions` edits blend mode/opacity/fill opacity, and `patternList` names the usable patterns. OK replaces the layer's effects in one step (`layer.layerStyle.replace`); Cancel discards. "New Style…" saves the pending state via `style.presets.new {effects}`, a swatch click applies a style preset, and Make/Reset Default use `layer.layerStyle.makeDefault` / `layer.layerStyle.defaultFor`diff --git a/docs/scorecard.md b/docs/scorecard.mdindex 7c7d9e68c..d109c3987 100644--- a/docs/scorecard.md+++ b/docs/scorecard.md@@ -163,7 +163,7 @@ Unread: `general.color_picker`, `general.beep_when_done`, `general.export_clipbo| Id | Target | Status | Issue | Note ||---|---|---|---|---|-| UI-217-1 | Tool options, last Export As / Save for Web / Fill settings and font recents persist | partial | [#217](https://github.com/storytold/photocraft/issues/217) | Fill (fill_ui.rs:72) and Liquify (liquify_ui.rs:64, #418) keep their settings in Preferences (prefs.dialogs); no tool_options/export fields in Preferences; export_dialog.rs:21 png/85 |+| UI-217-1 | Tool options, last Export As / Save for Web / Fill settings and font recents persist | partial | [#217](https://github.com/storytold/photocraft/issues/217) | Fill (fill_ui.rs:72) and Liquify (liquify_ui.rs:64, #418) keep their settings in Preferences (prefs.dialogs); no tool_options/export fields in Preferences; export_dialog.rs:21 png/85. Each painting tool keeps its own brush (paint_mouse.rs sync_tool_brush, #218), but those live in UiState, so they are lost at quit like the other tool options || UI-217-2 | Window size and dock width remembered across restarts | missing | [#217](https://github.com/storytold/photocraft/issues/217) | main.rs:46 native_options(): fixed 1440x900, centred on the main monitor (#419); dock.rs:529 snapshot omits the width || UI-217-3 | File > Open starts in the last-used folder | missing | [#217](https://github.com/storytold/photocraft/issues/217) | services.rs:110 FileDialog::new() without set_directory || UI-217-4 | Preferences all take effect; recent files persist and honour recent_file_count (#204) | missing | [#217](https://github.com/storytold/photocraft/issues/217) | See the prefs audit and BUG-204-* |diff --git a/scorecard/ui.toml b/scorecard/ui.tomlindex 5b7d84257..5fe1c7574 100644--- a/scorecard/ui.toml+++ b/scorecard/ui.toml@@ -10,7 +10,7 @@ id = "UI-217-1"target = "Tool options, last Export As / Save for Web / Fill settings and font recents persist"status = "partial"issue = 217-note = "Fill (fill_ui.rs:72) and Liquify (liquify_ui.rs:64, #418) keep their settings in Preferences (prefs.dialogs); no tool_options/export fields in Preferences; export_dialog.rs:21 png/85"+note = "Fill (fill_ui.rs:72) and Liquify (liquify_ui.rs:64, #418) keep their settings in Preferences (prefs.dialogs); no tool_options/export fields in Preferences; export_dialog.rs:21 png/85. Each painting tool keeps its own brush (paint_mouse.rs sync_tool_brush, #218), but those live in UiState, so they are lost at quit like the other tool options"[[item]]id = "UI-217-2"