mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 13:28:11 +00:00
ImageViewer: Don't resize the window after the first image is displayed
This commit is contained in:
parent
36c8b1c58c
commit
dd476c35cb
2 changed files with 5 additions and 1 deletions
|
@ -92,7 +92,8 @@ int main(int argc, char** argv)
|
|||
if (window->is_maximized())
|
||||
return;
|
||||
|
||||
if (scale == 100) {
|
||||
if (scale == 100 && !widget.scaled_for_first_image()) {
|
||||
widget.set_scaled_for_first_image(true);
|
||||
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);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue