ImageViewer: Use scaled image size when resizing window to fit it

When the image is flipped or rotated, the window is resized to ensure
that the image still fits in the frame. However, currently the original
bitmap rect is used, which doesn't take into account the scaling
factor. Fix this by using the scaled rect instead.
This commit is contained in:
Nícolas F. R. A. Prado 2021-10-18 23:58:30 -05:00 committed by Andreas Kling
parent 05d7ac1193
commit 72f1e23e6b
Notes: sideshowbarker 2024-07-18 02:09:54 +09:00

View File

@ -299,7 +299,7 @@ void ViewWidget::resize_window()
if (!m_bitmap)
return;
auto new_size = m_bitmap->size();
auto new_size = m_bitmap_rect.size();
if (new_size.width() < 300)
new_size.set_width(300);