1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-10 06:37:36 +00:00

GTableView: Add ability to hide individual columns at view-level.

Use this in IRCClient to hide the "sender" column in the server message view
since everything in that view comes from the "Server" anyway.
This commit is contained in:
Andreas Kling 2019-03-20 13:35:11 +01:00
parent d17a91f185
commit 951377e93e
5 changed files with 41 additions and 3 deletions

View file

@ -35,6 +35,9 @@ public:
void scroll_into_view(const GModelIndex&, Orientation);
bool is_column_hidden(int) const;
void set_column_hidden(int, bool);
private:
virtual void model_notification(const GModelNotification&);
@ -49,6 +52,7 @@ private:
int column_width(int) const;
void update_content_size();
Vector<bool> m_column_visibility;
RetainPtr<GTableModel> m_model;
int m_horizontal_padding { 5 };
bool m_headers_visible { true };