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

@ -46,6 +46,7 @@ public:
Size preferred_size() const { return m_preferred_size; }
void set_preferred_size(const Size&);
void set_preferred_size(int width, int height) { set_preferred_size({ width, height }); }
bool has_tooltip() const { return !m_tooltip.is_empty(); }
String tooltip() const { return m_tooltip; }