mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 11:18:11 +00:00
LibGUI: Let the table view tell HeaderView about the min. section size
Previously HeaderView would just assume that each column or row could have a minimum size of 2. This makes it so that AbstractTableView subclasses can provide a new minimum value for a specific column.
This commit is contained in:
parent
854e16797e
commit
ab2719fd53
3 changed files with 23 additions and 6 deletions
|
@ -179,6 +179,16 @@ void AbstractTableView::set_column_width(int column, int width)
|
|||
column_header().set_section_size(column, width);
|
||||
}
|
||||
|
||||
int AbstractTableView::minimum_column_width(int)
|
||||
{
|
||||
return 2;
|
||||
}
|
||||
|
||||
int AbstractTableView::minimum_row_height(int)
|
||||
{
|
||||
return 2;
|
||||
}
|
||||
|
||||
Gfx::TextAlignment AbstractTableView::column_header_alignment(int column_index) const
|
||||
{
|
||||
if (!model())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue