game_list.cpp: Resize columns to fit the size of their contents

This commit is contained in:
Reg Tiangha 2024-05-04 15:32:13 -06:00
parent 6a132c7a1a
commit 057df92af9
No known key found for this signature in database
GPG Key ID: 00D437798B1C2970
1 changed files with 6 additions and 0 deletions

View File

@ -475,6 +475,12 @@ void GameList::DonePopulating(const QStringList& watch_list) {
item_model->sort(tree_view->header()->sortIndicatorSection(),
tree_view->header()->sortIndicatorOrder());
// resize all columns except for Name to fit their contents
for (int i = 1; i <= COLUMN_COUNT; i++) {
tree_view->resizeColumnToContents(i);
}
tree_view->header()->setStretchLastSection(true);
emit PopulatingCompleted();
}