forked from qt-creator/qt-creator
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 <christian.kandeler@qt.io>
This commit is contained in:
@@ -201,6 +201,8 @@ void KitAspect::addListAspectSpec(const ListAspectSpec &listAspectSpec)
|
|||||||
const auto sortModel = new KitAspectSortModel(this);
|
const auto sortModel = new KitAspectSortModel(this);
|
||||||
sortModel->setSourceModel(listAspectSpec.model);
|
sortModel->setSourceModel(listAspectSpec.model);
|
||||||
comboBox->setModel(sortModel);
|
comboBox->setModel(sortModel);
|
||||||
|
comboBox->setMinimumContentsLength(15);
|
||||||
|
comboBox->setSizeAdjustPolicy(QComboBox::AdjustToMinimumContentsLengthWithIcon);
|
||||||
d->listAspects.emplaceBack(listAspectSpec, comboBox);
|
d->listAspects.emplaceBack(listAspectSpec, comboBox);
|
||||||
|
|
||||||
refresh();
|
refresh();
|
||||||
|
Reference in New Issue
Block a user