edit/crop: Apply aspect ration change internally
This commit is contained in:
parent
302139c5ce
commit
e66203783e
2 changed files with 3 additions and 2 deletions
|
|
@ -736,7 +736,7 @@ mod imp {
|
||||||
self.obj().set_height_request(width);
|
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(|| {
|
self.aspect_ratio_animation.get_or_init(|| {
|
||||||
adw::TimedAnimation::builder()
|
adw::TimedAnimation::builder()
|
||||||
.duration(200)
|
.duration(200)
|
||||||
|
|
@ -803,5 +803,6 @@ impl LpEditCropSelection {
|
||||||
pub fn is_in_user_change(&self) -> bool {
|
pub fn is_in_user_change(&self) -> bool {
|
||||||
self.imp().selection_in_resize.get().is_some()
|
self.imp().selection_in_resize.get().is_some()
|
||||||
|| self.imp().selection_in_move.get().is_some()
|
|| self.imp().selection_in_move.get().is_some()
|
||||||
|
|| self.imp().aspect_ratio_animation().state() == adw::AnimationState::Playing
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -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
|
// 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
|
// it under the terms of the GNU General Public License as published by
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue