mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 22:57:44 +00:00
LibGUI: Make CheckBox height adapt to the current font size
This commit is contained in:
parent
fdcdc14fce
commit
ee001cc417
2 changed files with 48 additions and 18 deletions
|
@ -29,6 +29,8 @@ public:
|
|||
CheckBoxPosition checkbox_position() const { return m_checkbox_position; }
|
||||
void set_checkbox_position(CheckBoxPosition value) { m_checkbox_position = value; }
|
||||
|
||||
virtual Optional<UISize> calculated_min_size() const override;
|
||||
|
||||
protected:
|
||||
explicit CheckBox(String = {});
|
||||
|
||||
|
@ -41,6 +43,10 @@ private:
|
|||
|
||||
virtual void paint_event(PaintEvent&) override;
|
||||
|
||||
Gfx::IntRect box_rect() const;
|
||||
int gap_between_box_and_rect() const;
|
||||
int horizontal_padding() const;
|
||||
|
||||
bool m_autosize { false };
|
||||
CheckBoxPosition m_checkbox_position { CheckBoxPosition::Left };
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue