mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 13:48:12 +00:00
LibGUI: Allow HeaderView column selectability to be toggled
Previously, any TableView column could be made visible through a context menu shown by right clicking on the table header. This change allows columns to be marked as non-selectable, so their visibility cannot be toggled in this way.
This commit is contained in:
parent
4ffd43a5f4
commit
1eb1f7bde9
2 changed files with 15 additions and 0 deletions
|
@ -36,6 +36,8 @@ public:
|
|||
bool is_section_visible(int section) const;
|
||||
void set_section_visible(int section, bool);
|
||||
|
||||
void set_section_selectable(int section, bool);
|
||||
|
||||
int section_count() const;
|
||||
Gfx::IntRect section_rect(int section) const;
|
||||
|
||||
|
@ -92,6 +94,7 @@ private:
|
|||
bool has_initialized_size { false };
|
||||
bool has_initialized_default_size { false };
|
||||
bool visibility { true };
|
||||
bool selectable { true };
|
||||
RefPtr<Action> visibility_action;
|
||||
Gfx::TextAlignment alignment { Gfx::TextAlignment::CenterLeft };
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue