diff --git a/news.d/49.2/fixed-no-zoom-when-window-too-large b/news.d/49.2/fixed-no-zoom-when-window-too-large new file mode 100644 index 0000000..2cf32ce --- /dev/null +++ b/news.d/49.2/fixed-no-zoom-when-window-too-large @@ -0,0 +1 @@ +Zooming in would not work via the zoom menu, if the resulting zoom state would still fit the image inside the window. diff --git a/src/widgets/image/zoom.rs b/src/widgets/image/zoom.rs index 13017e1..9ddf095 100644 --- a/src/widgets/image/zoom.rs +++ b/src/widgets/image/zoom.rs @@ -48,9 +48,9 @@ impl imp::LpImage { let max_zoom_factor = match self.fit_mode.get() { // Do not allow to zoom larger than original size - FitMode::BestFit => 1., + FitMode::BestFit | FitMode::ExactVolatile => 1., // Allow arbitrary zoom - FitMode::LargeFit | FitMode::ExactVolatile => f64::MAX, + FitMode::LargeFit => f64::MAX, }; let default_zoom = if texture_aspect_ratio > widget_aspect_ratio {