1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-26 21:47:46 +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

@ -957,7 +957,7 @@ void Terminal::set_size(u16 columns, u16 rows)
m_pixel_height = (frame_thickness() * 2) + (m_inset * 2) + (m_rows * (font().glyph_height() + m_line_spacing)) - m_line_spacing;
set_size_policy(SizePolicy::Fixed, SizePolicy::Fixed);
set_preferred_size({ m_pixel_width, m_pixel_height });
set_preferred_size(m_pixel_width, m_pixel_height);
m_needs_background_fill = true;
force_repaint();