mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-05 22:52:22 +02:00
LibGUI: Add space for sort order indicators in autosized table columns
This commit is contained in:
Notes:
sideshowbarker
2024-07-19 10:40:34 +09:00
Author: https://github.com/awesomekling Commit: https://github.com/SerenityOS/serenity/commit/69277f55380
@@ -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));
|
||||
|
||||
Reference in New Issue
Block a user