summaryrefslogtreecommitdiff
path: root/Games
diff options
context:
space:
mode:
authorLinus Groh <mail@linusgroh.de>2020-08-15 17:24:05 +0200
committerAndreas Kling <kling@serenityos.org>2020-08-15 17:38:19 +0200
commit2e5c434e22c8f03ebbb16a95c9e8bc88b2a76500 (patch)
tree91207fe770efafdd97810a7b23232d3afc80c465 /Games
parent0cab3bca2fb743f6bdc1e138b9f084cfcb42c7e4 (diff)
downloadserenity-2e5c434e22c8f03ebbb16a95c9e8bc88b2a76500.zip
Misc: Use automatic window positioning in more applications
This is a follow up to #2936 / d3e3b4ae56aa79d9bde12ca1f143dcf116f89a4c. Affected programs: - Applications: Browser (Download, View source, Inspect DOM tree, JS console), Terminal (Settings) - Demos: Cube, Eyes, Fire, HelloWorld, LibGfxDemo, WebView, WidgetGallery - DevTools: HackStudio, Inspector, Profiler - Games: 2048, Minesweeper, Snake, Solitaire - Userland: test-web A few have been left out where manual positioning is done on purpose, e.g. ClipboardManager (to be close to the menu bar) or VisualBuilder (to preserve alignment of the multiple application windows).
Diffstat (limited to 'Games')
-rw-r--r--Games/2048/main.cpp2
-rw-r--r--Games/Minesweeper/main.cpp2
-rw-r--r--Games/Snake/main.cpp2
-rw-r--r--Games/Solitaire/main.cpp2
4 files changed, 4 insertions, 4 deletions
diff --git a/Games/2048/main.cpp b/Games/2048/main.cpp
index 6e4c9a52ba..628270ce28 100644
--- a/Games/2048/main.cpp
+++ b/Games/2048/main.cpp
@@ -63,7 +63,7 @@ int main(int argc, char** argv)
window->set_double_buffering_enabled(false);
window->set_title("2048");
- window->set_rect(100, 100, 324, 336);
+ window->resize(324, 336);
auto& game = window->set_main_widget<TwentyFortyEightGame>();
game.set_fill_with_background_color(true);
diff --git a/Games/Minesweeper/main.cpp b/Games/Minesweeper/main.cpp
index 0562bbf2c3..0f6029376a 100644
--- a/Games/Minesweeper/main.cpp
+++ b/Games/Minesweeper/main.cpp
@@ -55,7 +55,7 @@ int main(int argc, char** argv)
auto window = GUI::Window::construct();
window->set_resizable(false);
window->set_title("Minesweeper");
- window->set_rect(100, 100, 139, 175);
+ window->resize(139, 175);
auto& widget = window->set_main_widget<GUI::Widget>();
widget.set_layout<GUI::VerticalBoxLayout>();
diff --git a/Games/Snake/main.cpp b/Games/Snake/main.cpp
index 6abc482e66..31c6fcf94a 100644
--- a/Games/Snake/main.cpp
+++ b/Games/Snake/main.cpp
@@ -53,7 +53,7 @@ int main(int argc, char** argv)
window->set_double_buffering_enabled(false);
window->set_title("Snake");
- window->set_rect(100, 100, 320, 320);
+ window->resize(320, 320);
auto& game = window->set_main_widget<SnakeGame>();
diff --git a/Games/Solitaire/main.cpp b/Games/Solitaire/main.cpp
index 99a316ef94..8a5ac75a82 100644
--- a/Games/Solitaire/main.cpp
+++ b/Games/Solitaire/main.cpp
@@ -45,7 +45,7 @@ int main(int argc, char** argv)
auto window = GUI::Window::construct();
window->set_resizable(false);
- window->set_rect(300, 100, SolitaireWidget::width, SolitaireWidget::height);
+ window->resize(SolitaireWidget::width, SolitaireWidget::height);
auto widget = SolitaireWidget::construct(window, [&](uint32_t score) {
window->set_title(String::format("Score: %u - Solitaire", score));