PhotoCraft: An open-source, photo editor written by scratch in pure Rust
Integration: rustfmt the merged tree, for #6195 and #5857
aionggf679b4cf1f16
diff --git a/crates/engine/src/file_cmds.rs b/crates/engine/src/file_cmds.rsindex b563b302c..3cec3e449 100644--- a/crates/engine/src/file_cmds.rs+++ b/crates/engine/src/file_cmds.rs@@ -1149,8 +1149,7 @@ pub(crate) fn process_tree(inputs: &[BatchInput], output: &str, format: &str, sa/// every file). Those are saved as PSD, the format Photoshop's Save As offers for a raw. An input/// whose file name has no extension (a dot in a folder name doesn't count) is saved as PNG.fn same_format(path: &str) -> String {- const IMPORT_ONLY: &[&str] =- &["pdn", "kra", "krz", "af", "afdesign", "afphoto", "afpub", "heic", "heif", "hif", "svg", "svgz", "cin", "pcx", "xpm"];+ const IMPORT_ONLY: &[&str] = &["pdn", "kra", "krz", "af", "afdesign", "afphoto", "afpub", "heic", "heif", "hif", "svg", "svgz", "cin", "pcx", "xpm"];let ext = extension(path).unwrap_or_else(|| "png".into());if photocraft_io::raw::EXTENSIONS.contains(&ext.as_str()) || IMPORT_ONLY.contains(&ext.as_str()) { "psd".into() } else { ext }}diff --git a/crates/tablet/src/lib.rs b/crates/tablet/src/lib.rsindex 06a5c92bf..78c17613e 100644--- a/crates/tablet/src/lib.rs+++ b/crates/tablet/src/lib.rs@@ -35,10 +35,10 @@ pub mod xi;#[cfg(target_os = "macos")]pub mod macos;-#[cfg(target_os = "linux")]-pub mod x11;#[cfg(target_os = "windows")]pub mod windows;+#[cfg(target_os = "linux")]+pub mod x11;/// One pen reading. Tilt is in degrees (-90..90, W3C Pointer Events convention: +x tilts to the/// right, +y towards the user), rotation in degrees 0..360 (clockwise).diff --git a/crates/ui-egui/src/canvas.rs b/crates/ui-egui/src/canvas.rsindex 328b9f75e..d2e535f3f 100644--- a/crates/ui-egui/src/canvas.rs+++ b/crates/ui-egui/src/canvas.rs@@ -4111,7 +4111,11 @@ pub fn canvas_view(app: &mut PhotocraftApp, ui: &mut egui::Ui, idx: usize, rect:t if resizing && crate::brush_resize::applies(t) => egui::CursorIcon::None,// ⌥ turns a painting tool into the Eyedropper (`alt_eyedropper`): its cursor too,// unless Preferences › Cursors › Other Cursors asks for the precise crosshair.- t if app.alt_sampling || (app.drag.is_none() && !app.services.right_button_down.as_ref().is_some_and(|f| f()) && alt_samples(t, crate::workspace_ui::sticky_mods(app, ui.input(|i| i.modifiers)))) => {+ t if app.alt_sampling+ || (app.drag.is_none()+ && !app.services.right_button_down.as_ref().is_some_and(|f| f())+ && alt_samples(t, crate::workspace_ui::sticky_mods(app, ui.input(|i| i.modifiers)))) =>+ {// While it samples (button held), the comparison ring replaces the cursor (#213).if let Some(icon) = eyedropper_ring(app, &painter, &xf, p, response.is_pointer_button_down_on()) {icon