1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 13:28:11 +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

@ -45,7 +45,7 @@ public:
set_tooltip(name);
set_button_style(ButtonStyle::CoolBar);
set_icon(GraphicsBitmap::load_from_file(icon_path));
set_preferred_size({ 50, 50 });
set_preferred_size(50, 50);
set_size_policy(SizePolicy::Fixed, SizePolicy::Fixed);
on_click = [this](GButton&) {
pid_t child_pid = fork();