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:
parent
5b440a72f9
commit
aa2224a2f0
26 changed files with 61 additions and 60 deletions
|
@ -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();
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue