Bläddra i källkod

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.
Nícolas F. R. A. Prado 3 år sedan
förälder
incheckning
72f1e23e6b
1 ändrade filer med 1 tillägg och 1 borttagningar
  1. 1 1
      Userland/Applications/ImageViewer/ViewWidget.cpp

+ 1 - 1
Userland/Applications/ImageViewer/ViewWidget.cpp

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