From 2bd9c8a5f90cd5eccc0d956dab9c18f13676b250 Mon Sep 17 00:00:00 2001 From: Adrien Destugues Date: Sun, 27 Apr 2014 17:59:54 +0200 Subject: [PATCH] ShowImage: fix scale-to-fit behavior * Fix the condition so that big images are fitted to the window on first time only if the option is set. * Small images are never stretched to the window size, as this isn't very useful. The interaction of this global setting with the zoom buttons is a bit confusing. Should they be merged? --- src/apps/showimage/ShowImageView.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/apps/showimage/ShowImageView.cpp b/src/apps/showimage/ShowImageView.cpp index 1a0faa431f..f09bc8d660 100644 --- a/src/apps/showimage/ShowImageView.cpp +++ b/src/apps/showimage/ShowImageView.cpp @@ -1630,7 +1630,7 @@ ShowImageView::FitToBounds() return; float fitToBoundsZoom = _FitToBoundsZoom(); - if (!fStretchToBounds && fitToBoundsZoom > 1.0f) + if (!fStretchToBounds || fitToBoundsZoom > 1.0f) SetZoom(1.0f); else SetZoom(fitToBoundsZoom);