image: Calculate next zoom step from target
This fixes that clicking a button/key during an animation does not give you the expected zoom speedup.
This commit is contained in:
parent
78e528d299
commit
ccfbcf60a8
1 changed files with 2 additions and 2 deletions
|
|
@ -729,7 +729,7 @@ impl LpImage {
|
||||||
///
|
///
|
||||||
/// Used by buttons
|
/// Used by buttons
|
||||||
pub fn zoom_in(&self) {
|
pub fn zoom_in(&self) {
|
||||||
let zoom = self.zoom() * ZOOM_FACTOR_BUTTON;
|
let zoom = self.imp().zoom_target.get() * ZOOM_FACTOR_BUTTON;
|
||||||
|
|
||||||
self.zoom_to(zoom);
|
self.zoom_to(zoom);
|
||||||
}
|
}
|
||||||
|
|
@ -738,7 +738,7 @@ impl LpImage {
|
||||||
///
|
///
|
||||||
/// Used by buttons
|
/// Used by buttons
|
||||||
pub fn zoom_out(&self) {
|
pub fn zoom_out(&self) {
|
||||||
let zoom = self.zoom() / ZOOM_FACTOR_BUTTON;
|
let zoom = self.imp().zoom_target.get() / ZOOM_FACTOR_BUTTON;
|
||||||
|
|
||||||
self.zoom_to(zoom);
|
self.zoom_to(zoom);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue