image: More fine-grained zoom instructions

Add parameters to use zoom_to without animation or
snapping to best fit. Hopefully fixing 100%/200% snapping
to best fit when close to filling the window and
fixing high res scroll wheel bugs.

Closes #120, #134

Part-of: <https://gitlab.gnome.org/Incubator/loupe/-/merge_requests/177>
This commit is contained in:
Sophie Herold 2023-04-13 04:52:14 +02:00 • committed by Marge Bot
parent 44e265374b
commit e96b9ccac9
4 changed files with 55 additions and 47 deletions

View file

@ -564,12 +564,6 @@ impl LpImageView {
}
}
pub fn zoom_to(&self, level: f64) {
if let Some(current_page) = self.current_page() {
current_page.image().zoom_to(level);
}
}
pub fn rotate_image(&self, angle: f64) {
if let Some(current_page) = self.current_page() {
current_page.image().rotate_by(angle);