1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-25 22:15:06 +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

@ -71,9 +71,9 @@ GScrollBar::GScrollBar(Orientation orientation, GWidget* parent)
s_right_arrow_bitmap = &CharacterBitmap::create_from_ascii(s_right_arrow_bitmap_data, 9, 9).leak_ref();
if (m_orientation == Orientation::Vertical) {
set_preferred_size({ 15, 0 });
set_preferred_size(15, 0);
} else {
set_preferred_size({ 0, 15 });
set_preferred_size(0, 15);
}
m_automatic_scrolling_timer.set_interval(100);