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
commit aa2224a2f0
Notes: sideshowbarker 2024-07-19 13:07:09 +09:00
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; }