mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-04-22 12:35:14 +00:00
LibGUI: Add space for sort order indicators in autosized table columns
This commit is contained in:
parent
56a28890eb
commit
69277f5538
Notes:
sideshowbarker
2024-07-19 10:40:34 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/69277f55380
1 changed files with 3 additions and 0 deletions
|
@ -33,11 +33,14 @@ void GAbstractColumnView::update_column_sizes()
|
|||
auto& model = *this->model();
|
||||
int column_count = model.column_count();
|
||||
int row_count = model.row_count();
|
||||
int key_column = model.key_column();
|
||||
|
||||
for (int column = 0; column < column_count; ++column) {
|
||||
if (is_column_hidden(column))
|
||||
continue;
|
||||
int header_width = header_font().width(model.column_name(column));
|
||||
if (column == key_column)
|
||||
header_width += font().width(" \xc3\xb6");
|
||||
int column_width = header_width;
|
||||
for (int row = 0; row < row_count; ++row) {
|
||||
auto cell_data = model.data(model.index(row, column));
|
||||
|
|
Loading…
Add table
Reference in a new issue