diff --git a/Cargo.lock b/Cargo.lock index bace764..87a925b 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -831,7 +831,7 @@ dependencies = [ [[package]] name = "glycin" version = "2.1.0-beta" -source = "git+https://gitlab.gnome.org/GNOME/glycin.git?rev=08d7799d6c29c544bfe6914d4e7921bbbeb5f3ff#08d7799d6c29c544bfe6914d4e7921bbbeb5f3ff" +source = "git+https://gitlab.gnome.org/GNOME/glycin.git?rev=1fa8de634adb5d5e5fcac3aee58290b4374b09da#1fa8de634adb5d5e5fcac3aee58290b4374b09da" dependencies = [ "async-fs", "async-io", @@ -862,7 +862,7 @@ dependencies = [ [[package]] name = "glycin-utils" version = "3.0.0-beta" -source = "git+https://gitlab.gnome.org/GNOME/glycin.git?rev=08d7799d6c29c544bfe6914d4e7921bbbeb5f3ff#08d7799d6c29c544bfe6914d4e7921bbbeb5f3ff" +source = "git+https://gitlab.gnome.org/GNOME/glycin.git?rev=1fa8de634adb5d5e5fcac3aee58290b4374b09da#1fa8de634adb5d5e5fcac3aee58290b4374b09da" dependencies = [ "env_logger", "gufo-common", @@ -1016,9 +1016,9 @@ dependencies = [ [[package]] name = "gufo-common" -version = "0.2.0-alpha.1" +version = "0.2.0-alpha.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "34b07b8af7ba58b6c455183ca059e6e39e461996582ec6b140a374b3201c3c05" +checksum = "90c3526dee6b3d1a2a8314538086d70092603c3363025d2b047e3abea1054336" dependencies = [ "chrono", "paste", diff --git a/Cargo.toml b/Cargo.toml index b41e0b2..441c17b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -29,13 +29,13 @@ gettext-sys = { version = "0.22.5", features = ["gettext-system"] } gio = { version = "0.20.0", features = ["v2_74"] } glycin = { version = "2.1.0-beta", features = [ "gdk4", -], git = "https://gitlab.gnome.org/GNOME/glycin.git", rev = "08d7799d6c29c544bfe6914d4e7921bbbeb5f3ff" } -gtk = { package = "gtk4", version = "0.9.6", features = [ +], git = "https://gitlab.gnome.org/GNOME/glycin.git", rev = "1fa8de634adb5d5e5fcac3aee58290b4374b09da" } +gtk = { package = "gtk4", version = "0.9.5", features = [ "v4_14", "xml_validation", ] } gufo = { version = "0.2.0-alpha.1", features = ["chrono", "all-image-formats"] } -gufo-common = { version = "0.2.0-alpha", features = ["serde"] } +gufo-common = { version = "0.2.0-alpha.2", features = ["serde"] } gvdb-macros = "0.1.6" indexmap = "2.0.0" libc = "0.2.158" diff --git a/build-aux/flatpak/org.gnome.Loupe.Devel.json b/build-aux/flatpak/org.gnome.Loupe.Devel.json index 5a1d9d7..9e0e8af 100644 --- a/build-aux/flatpak/org.gnome.Loupe.Devel.json +++ b/build-aux/flatpak/org.gnome.Loupe.Devel.json @@ -113,7 +113,7 @@ { "type": "git", "url": "https://gitlab.gnome.org/GNOME/glycin.git", - "commit": "08d7799d6c29c544bfe6914d4e7921bbbeb5f3ff" + "commit": "1fa8de634adb5d5e5fcac3aee58290b4374b09da" } ] }, diff --git a/src/editing.rs b/src/editing.rs index 82ab53f..0eaac01 100644 --- a/src/editing.rs +++ b/src/editing.rs @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Sophie Herold +// Copyright (c) 2024-2025 Sophie Herold // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by @@ -72,7 +72,7 @@ impl Queue { let edit_instruction = editor.apply_sparse(operations).await?; if edit_instruction.apply_to(file).await? == EditOutcome::Unchanged { - log::error!("Writing new files is not supported yet"); + log::warn!("Writing new files is not supported yet"); } Ok(()) diff --git a/src/widgets/image.rs b/src/widgets/image.rs index 9746963..010e1e7 100644 --- a/src/widgets/image.rs +++ b/src/widgets/image.rs @@ -176,9 +176,9 @@ mod imp { pub(super) decoder: RefCell>>, pub(super) overwrite_dimensions: Cell>, - /// Rotation final value (can differ from `rotation` during animation) + /// Rotation CCW final value (can differ from `rotation` during animation) pub(super) rotation_target: Cell, - /// Rotated presentation of original image in degrees clockwise + /// Rotated CCW presentation of original image in degrees clockwise #[property(get, set = Self::set_rotation, explicit_notify)] pub(super) rotation: Cell, // Animates the `rotation` property diff --git a/src/widgets/image/input_handling.rs b/src/widgets/image/input_handling.rs index d21e205..2f23d6d 100644 --- a/src/widgets/image/input_handling.rs +++ b/src/widgets/image/input_handling.rs @@ -239,7 +239,7 @@ impl imp::LpImage { #[weak] obj, move |gesture, _, _| { - let angle = gesture.angle_delta().to_degrees(); + let angle = -gesture.angle_delta().to_degrees(); // Only reset rotation if scale gesture is locked in if let Some(Gesture::Scale) = obj.imp().locked_gestured.get() { diff --git a/src/widgets/image/rendering.rs b/src/widgets/image/rendering.rs index 0d9d693..3f0810f 100644 --- a/src/widgets/image/rendering.rs +++ b/src/widgets/image/rendering.rs @@ -1,4 +1,4 @@ -// Copyright (c) 2023-2024 Sophie Herold +// Copyright (c) 2023-2025 Sophie Herold // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by @@ -249,7 +249,7 @@ impl imp::LpImage { )); // Apply the transformations from properties - snapshot.rotate(rotation); + snapshot.rotate(-rotation); if mirrored { snapshot.scale(-1., 1.); } diff --git a/src/widgets/image/rotation.rs b/src/widgets/image/rotation.rs index 6b9c462..8c21ccc 100644 --- a/src/widgets/image/rotation.rs +++ b/src/widgets/image/rotation.rs @@ -1,4 +1,4 @@ -// Copyright (c) 2023-2024 Sophie Herold +// Copyright (c) 2023-2025 Sophie Herold // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by @@ -78,9 +78,9 @@ impl LpImage { let orientation = self.metadata().orientation(); self.imp() .rotation_target - .set(-(orientation.rotate().degrees() as f64)); + .set(orientation.rotate().degrees() as f64); self.set_mirrored(orientation.mirror()); - self.set_rotation(-(orientation.rotate().degrees() as f64)); + self.set_rotation(orientation.rotate().degrees() as f64); } pub fn rotate_by(&self, angle: f64) { diff --git a/src/widgets/image_page.rs b/src/widgets/image_page.rs index 115475c..81be2f2 100644 --- a/src/widgets/image_page.rs +++ b/src/widgets/image_page.rs @@ -1,4 +1,4 @@ -// Copyright (c) 2022-2024 Sophie Herold +// Copyright (c) 2022-2025 Sophie Herold // Copyright (c) 2022, 2024 Christopher Davis // // This program is free software: you can redistribute it and/or modify diff --git a/src/widgets/image_window/actions.rs b/src/widgets/image_window/actions.rs index 8dd9ce4..186fd38 100644 --- a/src/widgets/image_window/actions.rs +++ b/src/widgets/image_window/actions.rs @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Sophie Herold +// Copyright (c) 2024-2025 Sophie Herold // // This program is free software: you can redistribute it and/or modify // it under the terms of the GNU General Public License as published by @@ -154,13 +154,13 @@ impl Action { // Rotation/Zoom Action::RotateCw => { klass.install_action(&action, None, |win, _, _| { - win.rotate_image(90.0); + win.rotate_image(-90.0); }); } Action::RotateCcw => { klass.install_action(&action, None, |win, _, _| { - win.rotate_image(-90.0); + win.rotate_image(90.0); }); }