From e66203783e75e37229160b93c8aff54d118a8edd Mon Sep 17 00:00:00 2001 From: Sophie Herold Date: Fri, 17 Jan 2025 22:58:10 +0100 Subject: [PATCH] edit/crop: Apply aspect ration change internally --- src/widgets/edit/crop_selection.rs | 3 ++- src/widgets/window.rs | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/widgets/edit/crop_selection.rs b/src/widgets/edit/crop_selection.rs index 55b4ec5..0420374 100644 --- a/src/widgets/edit/crop_selection.rs +++ b/src/widgets/edit/crop_selection.rs @@ -736,7 +736,7 @@ mod imp { self.obj().set_height_request(width); } - fn aspect_ratio_animation(&self) -> &adw::TimedAnimation { + pub(super) fn aspect_ratio_animation(&self) -> &adw::TimedAnimation { self.aspect_ratio_animation.get_or_init(|| { adw::TimedAnimation::builder() .duration(200) @@ -803,5 +803,6 @@ impl LpEditCropSelection { pub fn is_in_user_change(&self) -> bool { self.imp().selection_in_resize.get().is_some() || self.imp().selection_in_move.get().is_some() + || self.imp().aspect_ratio_animation().state() == adw::AnimationState::Playing } } diff --git a/src/widgets/window.rs b/src/widgets/window.rs index 8e586ad..4d79537 100644 --- a/src/widgets/window.rs +++ b/src/widgets/window.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