1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 19:07:35 +00:00

LibGUI: Margins for AbstractScrollableWidget

Implement, and use internally, content_margins() from Widget.
Since AbstractScrollableWidget already has a method called content_size,
the convenience method, with the same name, in Widget has to be
explicitly called.
This commit is contained in:
FrHun 2021-09-19 00:45:42 +02:00 committed by Andreas Kling
parent a4eeb6f9eb
commit dab7ec190e
2 changed files with 13 additions and 4 deletions

View file

@ -57,6 +57,8 @@ public:
int width_occupied_by_vertical_scrollbar() const;
int height_occupied_by_horizontal_scrollbar() const;
virtual Margins content_margins() const override;
void set_should_hide_unnecessary_scrollbars(bool b) { m_should_hide_unnecessary_scrollbars = b; }
bool should_hide_unnecessary_scrollbars() const { return m_should_hide_unnecessary_scrollbars; }