1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 07:38:10 +00:00

GWidget: Add set_preferred_size(width, height) overload.

It was annoying to always write set_preferred_size({ width, height }). :^)
This commit is contained in:
Andreas Kling 2019-07-20 22:39:24 +02:00
parent 5b440a72f9
commit aa2224a2f0
26 changed files with 61 additions and 60 deletions

View file

@ -26,7 +26,7 @@ int main(int argc, char** argv)
auto* button = new GButton(main_widget);
button->set_text("Good-bye");
button->set_size_policy(SizePolicy::Fill, SizePolicy::Fixed);
button->set_preferred_size({ 0, 20 });
button->set_preferred_size(0, 20);
button->on_click = [&](GButton&) {
app.quit();
};