1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 03:37:45 +00:00

LibGUI: Add autosize to CheckBox

This commit is contained in:
thankyouverycool 2021-04-04 11:12:17 -04:00 committed by Andreas Kling
parent 8afe013069
commit e8c1288e2c
2 changed files with 25 additions and 1 deletions

View file

@ -38,14 +38,21 @@ public:
virtual void click(unsigned modifiers = 0) override;
bool is_autosize() const { return m_autosize; }
void set_autosize(bool);
private:
explicit CheckBox(String = {});
void size_to_fit();
// These don't make sense for a check box, so hide them.
using AbstractButton::auto_repeat_interval;
using AbstractButton::set_auto_repeat_interval;
virtual void paint_event(PaintEvent&) override;
bool m_autosize { false };
};
}