diff --git a/Userland/Applications/ImageViewer/main.cpp b/Userland/Applications/ImageViewer/main.cpp index f6cb3f1680..d05f8284b4 100644 --- a/Userland/Applications/ImageViewer/main.cpp +++ b/Userland/Applications/ImageViewer/main.cpp @@ -92,9 +92,11 @@ int main(int argc, char** argv) if (window->is_maximized()) return; - auto w = max(window->width(), rect.width() + 4); - auto h = max(window->height(), rect.height() + widget.toolbar_height() + 6); - window->resize(w, h); + if (scale == 100) { + auto w = min(GUI::Desktop::the().rect().width(), rect.width() + 4); + auto h = min(GUI::Desktop::the().rect().height(), rect.height() + widget.toolbar_height() + 6); + window->resize(w, h); + } }; widget.on_drop = [&](auto& event) { window->move_to_front();