edit/crop: Apply aspect ration change internally

This commit is contained in:
Sophie Herold 2025-01-17 22:58:10 +01:00
parent 302139c5ce
commit e66203783e
2 changed files with 3 additions and 2 deletions

View file

@ -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
}
}