From 78282fe794501c4ab29e1070533e8a9e3b1b6043 Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Mon, 13 Jan 2025 13:25:52 +0100 Subject: [PATCH] Kits: Prevent long names from overly growing preferences The combo boxes for device names, toolchains, debuggers and others were setting their size to the length of the content. That meant that long names for these items lead to a huge horizontal size for the preference page content, leading to a lot of horizontal scrolling. Set the default for these combo boxes to something smaller. They still grow when resizing the preferences dialog. Change-Id: I95869b3ccdac049bdd1f7100af648e5ac5932745 Reviewed-by: Christian Kandeler --- src/plugins/projectexplorer/kitaspect.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/plugins/projectexplorer/kitaspect.cpp b/src/plugins/projectexplorer/kitaspect.cpp index f1fcf6b5813..c0bc60fcdb3 100644 --- a/src/plugins/projectexplorer/kitaspect.cpp +++ b/src/plugins/projectexplorer/kitaspect.cpp @@ -201,6 +201,8 @@ void KitAspect::addListAspectSpec(const ListAspectSpec &listAspectSpec) const auto sortModel = new KitAspectSortModel(this); sortModel->setSourceModel(listAspectSpec.model); comboBox->setModel(sortModel); + comboBox->setMinimumContentsLength(15); + comboBox->setSizeAdjustPolicy(QComboBox::AdjustToMinimumContentsLengthWithIcon); d->listAspects.emplaceBack(listAspectSpec, comboBox); refresh();