diff options
author | Andreas Kling <awesomekling@gmail.com> | 2019-07-20 22:39:24 +0200 |
---|---|---|
committer | Andreas Kling <awesomekling@gmail.com> | 2019-07-20 22:39:24 +0200 |
commit | aa2224a2f05961b571ced26b504dd5eac84db994 (patch) | |
tree | 99548538e3dc99a2837abb523eee0bcab9b072ef /Applications/About | |
parent | 5b440a72f957e31e526d7f11f918dd6ec749c9bf (diff) | |
download | serenity-aa2224a2f05961b571ced26b504dd5eac84db994.zip |
GWidget: Add set_preferred_size(width, height) overload.
It was annoying to always write set_preferred_size({ width, height }). :^)
Diffstat (limited to 'Applications/About')
-rw-r--r-- | Applications/About/main.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Applications/About/main.cpp b/Applications/About/main.cpp index e89a903c14..8b29c89b3c 100644 --- a/Applications/About/main.cpp +++ b/Applications/About/main.cpp @@ -34,7 +34,7 @@ int main(int argc, char** argv) label->set_font(Font::default_bold_font()); label->set_text("Serenity Operating System"); label->set_size_policy(SizePolicy::Fill, SizePolicy::Fixed); - label->set_preferred_size({ 0, 11 }); + label->set_preferred_size(0, 11); utsname uts; int rc = uname(&uts); @@ -43,12 +43,12 @@ int main(int argc, char** argv) auto* version_label = new GLabel(widget); version_label->set_text(String::format("Version %s", uts.release)); version_label->set_size_policy(SizePolicy::Fill, SizePolicy::Fixed); - version_label->set_preferred_size({ 0, 11 }); + version_label->set_preferred_size(0, 11); auto* quit_button = new GButton(widget); quit_button->set_text("Okay"); quit_button->set_size_policy(SizePolicy::Fixed, SizePolicy::Fixed); - quit_button->set_preferred_size({ 100, 20 }); + quit_button->set_preferred_size(100, 20); quit_button->on_click = [](GButton&) { GApplication::the().quit(0); }; |