mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 11:18:11 +00:00
LibGUI: Add a callback when the visible columns of a TableView change
This commit is contained in:
parent
8eff3b1910
commit
4c349165f2
2 changed files with 4 additions and 0 deletions
|
@ -376,6 +376,9 @@ void AbstractTableView::header_did_change_section_visibility(Badge<HeaderView>,
|
||||||
{
|
{
|
||||||
update_content_size();
|
update_content_size();
|
||||||
update();
|
update();
|
||||||
|
|
||||||
|
if (on_visible_columns_changed)
|
||||||
|
on_visible_columns_changed();
|
||||||
}
|
}
|
||||||
|
|
||||||
void AbstractTableView::set_default_column_width(int column, int width)
|
void AbstractTableView::set_default_column_width(int column, int width)
|
||||||
|
|
|
@ -44,6 +44,7 @@ public:
|
||||||
// These return/accept a comma-separated list of column ids, for storing in a config file.
|
// These return/accept a comma-separated list of column ids, for storing in a config file.
|
||||||
ErrorOr<String> get_visible_columns() const;
|
ErrorOr<String> get_visible_columns() const;
|
||||||
void set_visible_columns(StringView column_ids);
|
void set_visible_columns(StringView column_ids);
|
||||||
|
Function<void()> on_visible_columns_changed;
|
||||||
|
|
||||||
int column_width(int column) const;
|
int column_width(int column) const;
|
||||||
void set_column_width(int column, int width);
|
void set_column_width(int column, int width);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue