mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 20:47:45 +00:00
Userland: Remember window state of productivity / editor applications
This commit is contained in:
parent
04ee15a5ad
commit
5d37e1c220
17 changed files with 34 additions and 16 deletions
|
@ -43,7 +43,8 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
auto window = GUI::Window::construct();
|
||||
window->set_title("GML Playground");
|
||||
window->set_icon(app_icon.bitmap_for_size(16));
|
||||
window->resize(800, 600);
|
||||
window->restore_size_and_position("GMLPlayground"sv, "Window"sv, { { 800, 600 } });
|
||||
window->save_size_and_position_on_close("GMLPlayground"sv, "Window"sv);
|
||||
|
||||
auto main_widget = TRY(MainWidget::try_create(app_icon));
|
||||
window->set_main_widget(main_widget);
|
||||
|
|
|
@ -44,7 +44,8 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
Config::pledge_domains({ "HackStudio", "Terminal", "FileManager" });
|
||||
|
||||
auto window = GUI::Window::construct();
|
||||
window->resize(840, 600);
|
||||
window->restore_size_and_position("HackStudio"sv, "Window"sv, { { 840, 600 } });
|
||||
window->save_size_and_position_on_close("HackStudio"sv, "Window"sv);
|
||||
auto icon = TRY(Gfx::Bitmap::load_from_file("/res/icons/16x16/app-hack-studio.png"sv));
|
||||
window->set_icon(icon);
|
||||
|
||||
|
|
|
@ -86,7 +86,8 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
|
||||
window->set_title("Profiler");
|
||||
window->set_icon(app_icon.bitmap_for_size(16));
|
||||
window->resize(800, 600);
|
||||
window->restore_size_and_position("Profiler"sv, "Window"sv, { { 800, 600 } });
|
||||
window->save_size_and_position_on_close("Profiler"sv, "Window"sv);
|
||||
|
||||
auto main_widget = window->set_main_widget<GUI::Widget>();
|
||||
main_widget->set_fill_with_background_color(true);
|
||||
|
|
|
@ -26,7 +26,8 @@ ErrorOr<int> serenity_main(Main::Arguments arguments)
|
|||
auto app_icon = GUI::Icon::default_icon("app-sql-studio"sv);
|
||||
|
||||
auto window = GUI::Window::construct();
|
||||
window->resize(640, 480);
|
||||
window->restore_size_and_position("SQLStudio"sv, "Window"sv, { { 640, 480 } });
|
||||
window->save_size_and_position_on_close("SQLStudio"sv, "Window"sv);
|
||||
window->set_icon(app_icon.bitmap_for_size(16));
|
||||
window->set_title("SQL Studio");
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue