From 8dc1913db8487915541d8deafeea4a6ebe64f8bc Mon Sep 17 00:00:00 2001 From: merry Date: Sat, 2 Apr 2022 13:39:35 +0100 Subject: configure_per_game_addons: Stretch first column and not last This provides more sensible column widths. --- src/yuzu/configuration/configure_per_game_addons.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/yuzu/configuration/configure_per_game_addons.cpp b/src/yuzu/configuration/configure_per_game_addons.cpp index 21e51d749..e8428bbd2 100644 --- a/src/yuzu/configuration/configure_per_game_addons.cpp +++ b/src/yuzu/configuration/configure_per_game_addons.cpp @@ -47,6 +47,9 @@ ConfigurePerGameAddons::ConfigurePerGameAddons(Core::System& system_, QWidget* p item_model->setHeaderData(0, Qt::Horizontal, tr("Patch Name")); item_model->setHeaderData(1, Qt::Horizontal, tr("Version")); + tree_view->header()->setStretchLastSection(false); + tree_view->header()->setSectionResizeMode(0, QHeaderView::ResizeMode::Stretch); + // We must register all custom types with the Qt Automoc system so that we are able to use it // with signals/slots. In this case, QList falls under the umbrella of custom types. qRegisterMetaType>("QList"); @@ -138,5 +141,5 @@ void ConfigurePerGameAddons::LoadConfiguration() { item_model->appendRow(list_items.back()); } - tree_view->setColumnWidth(0, 5 * tree_view->width() / 16); + tree_view->resizeColumnToContents(1); } -- cgit v1.2.3 From f4004b12713cd49118f610792a09432e81996295 Mon Sep 17 00:00:00 2001 From: merry Date: Sat, 2 Apr 2022 17:19:25 +0100 Subject: configure_per_game_addons: Set tree view minimum section size to 150px --- src/yuzu/configuration/configure_per_game_addons.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/src/yuzu/configuration/configure_per_game_addons.cpp b/src/yuzu/configuration/configure_per_game_addons.cpp index e8428bbd2..7893a85bb 100644 --- a/src/yuzu/configuration/configure_per_game_addons.cpp +++ b/src/yuzu/configuration/configure_per_game_addons.cpp @@ -49,6 +49,7 @@ ConfigurePerGameAddons::ConfigurePerGameAddons(Core::System& system_, QWidget* p tree_view->header()->setStretchLastSection(false); tree_view->header()->setSectionResizeMode(0, QHeaderView::ResizeMode::Stretch); + tree_view->header()->setMinimumSectionSize(150); // We must register all custom types with the Qt Automoc system so that we are able to use it // with signals/slots. In this case, QList falls under the umbrella of custom types. -- cgit v1.2.3