mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 08:08:12 +00:00
LibGUI: Teach GScrollableWidget how to hide unnecessary scrollbars
This is now an opt-in mode enabled by calling: should_hide_unnecessary_scrollbars(true) This patch enables the mode for GTreeView and GTableView. :^)
This commit is contained in:
parent
fb39e46d3d
commit
7a906ab539
4 changed files with 25 additions and 2 deletions
|
@ -38,6 +38,9 @@ public:
|
|||
int width_occupied_by_vertical_scrollbar() const;
|
||||
int height_occupied_by_horizontal_scrollbar() const;
|
||||
|
||||
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; }
|
||||
|
||||
protected:
|
||||
explicit GScrollableWidget(GWidget* parent);
|
||||
virtual void custom_layout() override;
|
||||
|
@ -56,4 +59,5 @@ private:
|
|||
Size m_content_size;
|
||||
Size m_size_occupied_by_fixed_elements;
|
||||
bool m_scrollbars_enabled { true };
|
||||
bool m_should_hide_unnecessary_scrollbars { false };
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue