mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-23 09:51:57 -05:00
Applications: Stop setting initial window location
This will let the WindowManager choose the location of the window
This commit is contained in:
parent
5ae9eee4a3
commit
4bf4a071a6
17 changed files with 14 additions and 17 deletions
|
@ -121,7 +121,7 @@ int main(int argc, char** argv)
|
|||
auto bookmarks_bar = Browser::BookmarksBarWidget::construct(Browser::bookmarks_filename, bookmarksbar_enabled);
|
||||
|
||||
auto window = GUI::Window::construct();
|
||||
window->set_rect(100, 100, 640, 480);
|
||||
window->resize(640, 480);
|
||||
window->set_icon(Gfx::Bitmap::load_from_file("/res/icons/16x16/app-browser.png"));
|
||||
window->set_title("Browser");
|
||||
|
||||
|
|
|
@ -58,7 +58,7 @@ int main(int argc, char** argv)
|
|||
auto window = GUI::Window::construct();
|
||||
window->set_title("Calculator");
|
||||
window->set_resizable(false);
|
||||
window->set_rect({ 300, 200, 254, 213 });
|
||||
window->resize(254, 213);
|
||||
|
||||
window->set_main_widget<CalculatorWidget>();
|
||||
|
||||
|
|
|
@ -58,7 +58,7 @@ int main(int argc, char** argv)
|
|||
|
||||
auto window = GUI::Window::construct();
|
||||
window->set_title("Calendar");
|
||||
window->set_rect(20, 200, 596, 475);
|
||||
window->resize(596, 475);
|
||||
|
||||
auto& calendar_widget = window->set_main_widget<CalendarWidget>();
|
||||
window->show();
|
||||
|
|
|
@ -56,7 +56,6 @@ int main(int argc, char** argv)
|
|||
auto window = GUI::Window::construct();
|
||||
dbg() << "main window: " << window;
|
||||
window->set_title("Display settings");
|
||||
window->move_to(100, 100);
|
||||
window->resize(360, 390);
|
||||
window->set_resizable(false);
|
||||
window->set_main_widget(instance->root_widget());
|
||||
|
|
|
@ -86,7 +86,7 @@ int main(int argc, char** argv)
|
|||
auto& font_editor_widget = window->set_main_widget<FontEditorWidget>(path, move(font));
|
||||
window->set_rect({ point, { font_editor_widget.preferred_width(), font_editor_widget.preferred_height() } });
|
||||
};
|
||||
set_edited_font(path, move(edited_font), { 50, 50 });
|
||||
set_edited_font(path, move(edited_font), window->position());
|
||||
|
||||
auto menubar = GUI::MenuBar::construct();
|
||||
|
||||
|
|
|
@ -86,7 +86,7 @@ int main(int argc, char* argv[])
|
|||
auto window = GUI::Window::construct();
|
||||
window->set_icon(app_icon.bitmap_for_size(16));
|
||||
window->set_title("Help");
|
||||
window->set_rect(300, 200, 570, 500);
|
||||
window->resize(570, 500);
|
||||
|
||||
auto& widget = window->set_main_widget<GUI::Widget>();
|
||||
widget.set_layout<GUI::VerticalBoxLayout>();
|
||||
|
|
|
@ -44,7 +44,7 @@ int main(int argc, char** argv)
|
|||
|
||||
auto window = GUI::Window::construct();
|
||||
window->set_title("Hex Editor");
|
||||
window->set_rect(20, 200, 640, 400);
|
||||
window->resize(640, 400);
|
||||
|
||||
auto& hex_editor_widget = window->set_main_widget<HexEditorWidget>();
|
||||
|
||||
|
|
|
@ -58,7 +58,7 @@ IRCAppWindow::IRCAppWindow(String server, int port)
|
|||
set_icon(Gfx::Bitmap::load_from_file("/res/icons/16x16/app-irc-client.png"));
|
||||
|
||||
update_title();
|
||||
set_rect(200, 200, 600, 400);
|
||||
resize(600, 400);
|
||||
setup_actions();
|
||||
setup_menus();
|
||||
setup_widgets();
|
||||
|
|
|
@ -50,7 +50,6 @@ int main(int argc, char** argv)
|
|||
window->set_icon(app_icon.bitmap_for_size(16));
|
||||
window->set_main_widget<KeyboardMapperWidget>();
|
||||
window->resize(775, 315);
|
||||
window->move_to(50, 50);
|
||||
window->set_resizable(false);
|
||||
window->show();
|
||||
|
||||
|
|
|
@ -90,7 +90,7 @@ int main(int argc, char** argv)
|
|||
|
||||
auto window = GUI::Window::construct();
|
||||
window->set_title("Keyboard settings");
|
||||
window->set_rect(200, 200, 300, 70);
|
||||
window->resize(300, 70);
|
||||
window->set_icon(app_icon.bitmap_for_size(16));
|
||||
|
||||
auto& root_widget = window->set_main_widget<GUI::Widget>();
|
||||
|
|
|
@ -54,7 +54,7 @@ int main(int argc, char** argv)
|
|||
auto window = GUI::Window::construct();
|
||||
auto& main_widget = window->set_main_widget<MainWidget>(track_manager);
|
||||
window->set_title("Piano");
|
||||
window->set_rect(90, 90, 840, 600);
|
||||
window->resize(840, 600);
|
||||
window->set_icon(Gfx::Bitmap::load_from_file("/res/icons/16x16/app-piano.png"));
|
||||
window->show();
|
||||
|
||||
|
|
|
@ -71,7 +71,7 @@ int main(int argc, char** argv)
|
|||
|
||||
auto window = GUI::Window::construct();
|
||||
window->set_title("PixelPaint");
|
||||
window->set_rect(40, 100, 950, 570);
|
||||
window->resize(950, 570);
|
||||
window->set_icon(app_icon.bitmap_for_size(16));
|
||||
|
||||
auto& horizontal_container = window->set_main_widget<GUI::Widget>();
|
||||
|
|
|
@ -69,7 +69,7 @@ int main(int argc, char** argv)
|
|||
|
||||
auto window = GUI::Window::construct();
|
||||
window->set_double_buffering_enabled(true);
|
||||
window->set_rect(200, 200, 300, 200);
|
||||
window->resize(300, 200);
|
||||
window->set_icon(Gfx::Bitmap::load_from_file("/res/icons/16x16/filetype-image.png"));
|
||||
window->set_title("QuickShow");
|
||||
|
||||
|
|
|
@ -61,7 +61,7 @@ int main(int argc, char** argv)
|
|||
auto window = GUI::Window::construct();
|
||||
window->set_title("SoundPlayer");
|
||||
window->set_resizable(false);
|
||||
window->set_rect(300, 300, 350, 140);
|
||||
window->resize(350, 140);
|
||||
window->set_icon(Gfx::Bitmap::load_from_file("/res/icons/16x16/app-sound-player.png"));
|
||||
|
||||
auto menubar = GUI::MenuBar::construct();
|
||||
|
|
|
@ -153,7 +153,7 @@ int main(int argc, char** argv)
|
|||
|
||||
auto window = GUI::Window::construct();
|
||||
window->set_title("System Monitor");
|
||||
window->set_rect(20, 200, 680, 400);
|
||||
window->resize(680, 400);
|
||||
|
||||
auto& keeper = window->set_main_widget<GUI::Widget>();
|
||||
keeper.set_layout<GUI::VerticalBoxLayout>();
|
||||
|
|
|
@ -255,7 +255,6 @@ int main(int argc, char** argv)
|
|||
terminal.on_title_change = [&](auto& title) {
|
||||
window->set_title(title);
|
||||
};
|
||||
window->move_to(300, 300);
|
||||
terminal.apply_size_increments_to_window(*window);
|
||||
window->show();
|
||||
window->set_icon(Gfx::Bitmap::load_from_file("/res/icons/16x16/app-terminal.png"));
|
||||
|
|
|
@ -55,7 +55,7 @@ int main(int argc, char** argv)
|
|||
|
||||
auto window = GUI::Window::construct();
|
||||
window->set_title("Text Editor");
|
||||
window->set_rect(20, 200, 640, 400);
|
||||
window->resize(640, 400);
|
||||
|
||||
auto& text_widget = window->set_main_widget<TextEditorWidget>();
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue