image: Fix setting horizontal instead of vertical
Fix horizontal scrollbar sometimes jumping to center while zooming in.
This commit is contained in:
parent
229c63719e
commit
0b7e30af30
3 changed files with 13 additions and 1 deletions
5
NEWS
5
NEWS
|
|
@ -1,3 +1,8 @@
|
||||||
|
45.3
|
||||||
|
====
|
||||||
|
|
||||||
|
- Fix horizontal scrollbar sometimes jumping to center while zooming in
|
||||||
|
|
||||||
45.2
|
45.2
|
||||||
====
|
====
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -66,6 +66,13 @@
|
||||||
</categories>
|
</categories>
|
||||||
|
|
||||||
<releases>
|
<releases>
|
||||||
|
<release version="45.3" date="2023-12-12">
|
||||||
|
<description>
|
||||||
|
<ul>
|
||||||
|
<li>Zooming into wide images can no longer cause the horizontal scrollbar to suddenly jump into the center position.</li>
|
||||||
|
</ul>
|
||||||
|
</description>
|
||||||
|
</release>
|
||||||
<release version="45.2" date="2023-11-28">
|
<release version="45.2" date="2023-11-28">
|
||||||
<description>
|
<description>
|
||||||
<ul>
|
<ul>
|
||||||
|
|
|
||||||
|
|
@ -1426,7 +1426,7 @@ impl LpImage {
|
||||||
let target_vborder = self.widget_height() - self.image_size().1 as f64 * zoom;
|
let target_vborder = self.widget_height() - self.image_size().1 as f64 * zoom;
|
||||||
|
|
||||||
self.imp()
|
self.imp()
|
||||||
.zoom_hscrollbar_transition
|
.zoom_vscrollbar_transition
|
||||||
.set(current_vborder.signum() != target_vborder.signum() && current_vborder != 0.);
|
.set(current_vborder.signum() != target_vborder.signum() && current_vborder != 0.);
|
||||||
|
|
||||||
let animation = self.zoom_animation();
|
let animation = self.zoom_animation();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue