Make inspector never upscale in fit-to-window mode
When zoomed completely out, don't upscale images.
This commit is contained in:
parent
9df34be6cb
commit
6535cb4a94
@ -432,7 +432,7 @@ bool Inspector::on_draw(const ::Cairo::RefPtr< Cairo::Context> &cr)
|
||||
availableSize.y = win->get_height() * deviceScale;
|
||||
int imW = rtengine::max<int>(currImage->imgBuffer.getWidth(), 1);
|
||||
int imH = rtengine::max<int>(currImage->imgBuffer.getHeight(), 1);
|
||||
scale = rtengine::min<double>(availableSize.x / imW, availableSize.y / imH);
|
||||
scale = rtengine::min(1., rtengine::min<double>(availableSize.x / imW, availableSize.y / imH));
|
||||
if (scaled) {
|
||||
// reduce size of image to fit into window, no further zoom down
|
||||
zoomScale = rtengine::max<double>(zoomScale, 1.0);
|
||||
|
Loading…
x
Reference in New Issue
Block a user