aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlessandro Portale <alessandro.portale@qt.io>2021-12-08 23:21:36 +0100
committerAlessandro Portale <alessandro.portale@qt.io>2021-12-09 17:03:32 +0000
commitd681933a6bd3c6cc3c934b0ad4bf98d07232c1c8 (patch)
tree9c49e3fd82225ac268e9bf7724c7b1adf6437bcc
parentd4c6f06a63ad38043158f8a399cbc8974437c5f8 (diff)
ProjectExplorer: Don't squeeze device combobox too much
Respect the preferred width of DeviceKitAspectWidget's device combobox. That prevents the combobox to be squeexed together. However, reduce the preferred minimum content length to avoid too wide stretching of the combobox for the Kit Page. Fixes: QTCREATORBUG-26707 Change-Id: I87d32d3ebbc559351db782eb1a9b1f248616c688 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
-rw-r--r--src/plugins/projectexplorer/kitinformation.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/plugins/projectexplorer/kitinformation.cpp b/src/plugins/projectexplorer/kitinformation.cpp
index af4a900946..171ab499b9 100644
--- a/src/plugins/projectexplorer/kitinformation.cpp
+++ b/src/plugins/projectexplorer/kitinformation.cpp
@@ -900,8 +900,10 @@ public:
m_comboBox(createSubWidget<QComboBox>()),
m_model(new DeviceManagerModel(DeviceManager::instance()))
{
- m_comboBox->setSizePolicy(QSizePolicy::Ignored, m_comboBox->sizePolicy().verticalPolicy());
+ m_comboBox->setSizePolicy(QSizePolicy::Preferred,
+ m_comboBox->sizePolicy().verticalPolicy());
m_comboBox->setModel(m_model);
+ m_comboBox->setMinimumContentsLength(16); // Don't stretch too much for Kit Page
m_manageButton = createManageButton(Constants::DEVICE_SETTINGS_PAGE_ID);
refresh();
m_comboBox->setToolTip(ki->description());