1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 10:38:11 +00:00

FileManager: Set main window size before showing the window

This prevents sometimes seeing a smaller FileManager window on startup
before it resizes to the proper size.
This commit is contained in:
Andreas Kling 2021-07-20 15:27:29 +02:00
parent f85b94e6d4
commit d0fb511d75

View file

@ -1199,12 +1199,12 @@ int run_in_windowed_mode(RefPtr<Core::ConfigFile> config, String initial_locatio
paste_action->set_enabled(GUI::Clipboard::the().mime_type() == "text/uri-list" && access(initial_location.characters(), W_OK) == 0);
window->show();
window->set_rect({ left, top, width, height });
if (was_maximized)
window->set_maximized(true);
window->show();
// Read directory read mode from config.
auto dir_view_mode = config->read_entry("DirectoryView", "ViewMode", "Icon");