From ebd792d8c1599be1377e48c1cc50cf94d82b8905 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Sun, 20 Feb 2011 15:39:25 +0000 Subject: [PATCH] * Made the minimum zoom depend on the actual zoom factor, too. This fixes the wrong resizing as observed by humdinger. * I did not remove the limit altogether, because it's a bit odd to be able to zoom out until you only see a pixel from the original image... Maybe someone has a better idea on how to go about this. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@40582 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/apps/showimage/ShowImageView.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/apps/showimage/ShowImageView.cpp b/src/apps/showimage/ShowImageView.cpp index 4560450e97..94685f6154 100644 --- a/src/apps/showimage/ShowImageView.cpp +++ b/src/apps/showimage/ShowImageView.cpp @@ -1538,8 +1538,8 @@ ShowImageView::SetZoom(float zoom, BPoint where) float fitToBoundsZoom = _FitToBoundsZoom(); if (zoom > 32) zoom = 32; - if (zoom < fitToBoundsZoom / 2) - zoom = fitToBoundsZoom / 2; + if (zoom < fitToBoundsZoom / 2 && zoom < 0.25) + zoom = min_c(fitToBoundsZoom / 2, 0.25); if (zoom == fZoom) { // window size might have changed