image: Fix setting horizontal instead of vertical

Fix horizontal scrollbar sometimes jumping to center while zooming in.
This commit is contained in:
Sophie Herold 2023-12-05 23:32:35 +01:00
parent 229c63719e
commit 0b7e30af30
3 changed files with 13 additions and 1 deletions

View file

@ -1426,7 +1426,7 @@ impl LpImage {
let target_vborder = self.widget_height() - self.image_size().1 as f64 * zoom;
self.imp()
.zoom_hscrollbar_transition
.zoom_vscrollbar_transition
.set(current_vborder.signum() != target_vborder.signum() && current_vborder != 0.);
let animation = self.zoom_animation();