From 3a2f10fbbe6d5dbe7b57e27bfb960a1e0982ef2e Mon Sep 17 00:00:00 2001 From: Andreas Kling Date: Fri, 10 May 2019 22:11:18 +0200 Subject: [PATCH] About: Center the window on screen and make it non-resizable. --- Applications/About/main.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Applications/About/main.cpp b/Applications/About/main.cpp index eb360e2d83..5bafc60c0e 100644 --- a/Applications/About/main.cpp +++ b/Applications/About/main.cpp @@ -3,6 +3,7 @@ #include #include #include +#include #include int main(int argc, char** argv) @@ -12,7 +13,8 @@ int main(int argc, char** argv) auto* window = new GWindow; window->set_title("About Serenity"); Rect window_rect { 0, 0, 240, 150 }; - window_rect.center_within({ 0, 0, 1024, 768 }); + window_rect.center_within(GDesktop::the().rect()); + window->set_resizable(false); window->set_rect(window_rect); window->set_should_exit_event_loop_on_close(true);