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?
This commit is contained in:
@@ -1630,7 +1630,7 @@ ShowImageView::FitToBounds()
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
float fitToBoundsZoom = _FitToBoundsZoom();
|
float fitToBoundsZoom = _FitToBoundsZoom();
|
||||||
if (!fStretchToBounds && fitToBoundsZoom > 1.0f)
|
if (!fStretchToBounds || fitToBoundsZoom > 1.0f)
|
||||||
SetZoom(1.0f);
|
SetZoom(1.0f);
|
||||||
else
|
else
|
||||||
SetZoom(fitToBoundsZoom);
|
SetZoom(fitToBoundsZoom);
|
||||||
|
|||||||
Reference in New Issue
Block a user