Explorar o código

ImageViewer: Fix window resizing on first image

The logic in place for this no longer worked since we abstracted away
the logic for zooming / panning (which changed how scale is stored).
This commit fixes the behaviour so when the first image is opened, the
window resizes to fit it.
Mustafa Quraish %!s(int64=3) %!d(string=hai) anos
pai
achega
481ed1ca16
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      Userland/Applications/ImageViewer/main.cpp

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

@@ -76,7 +76,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
 
         window->set_title(String::formatted("{} {} {}% - Image Viewer", widget->path(), widget->bitmap()->size().to_string(), (int)(scale * 100)));
 
-        if (scale == 100 && !widget->scaled_for_first_image()) {
+        if (!widget->scaled_for_first_image()) {
             widget->set_scaled_for_first_image(true);
             widget->resize_window();
         }