UI: Set headless-browser width and height

This commit is contained in:
Pavel Shliak 2024-11-13 22:33:12 +04:00 committed by Tim Flynn
commit ce56bc29e2
Notes: github-actions[bot] 2024-11-13 21:53:34 +00:00
3 changed files with 5 additions and 2 deletions

View file

@ -71,8 +71,7 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
auto theme_path = LexicalPath::join(app->resources_folder, "themes"sv, "Default.ini"sv);
auto theme = TRY(Gfx::load_system_theme(theme_path.string()));
// FIXME: Allow passing the window size as an argument.
static constexpr Web::DevicePixelSize window_size { 800, 600 };
static Web::DevicePixelSize window_size { app->width, app->height };
if (!app->test_root_path.is_empty()) {
app->test_root_path = LexicalPath::absolute_path(TRY(FileSystem::current_working_directory()), app->test_root_path);