From 1e925bd5ead3fe98c75bf0f1a2beabd6685a3035 Mon Sep 17 00:00:00 2001 From: Reg Tiangha Date: Sat, 4 May 2024 22:19:36 -0600 Subject: [PATCH] game_list.cpp: Resize columns to fit the size of their contents --- src/lime_qt/game_list.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/lime_qt/game_list.cpp b/src/lime_qt/game_list.cpp index 8e5533aed..498da398c 100644 --- a/src/lime_qt/game_list.cpp +++ b/src/lime_qt/game_list.cpp @@ -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(); }