summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomi Korpipaa <tomi.korpipaa@qt.io>2018-05-07 11:04:57 +0300
committerTomi Korpipää <tomi.korpipaa@qt.io>2018-05-07 08:11:57 +0000
commit929976be1b9732e3b3a670fabf1ebbbdea989caa (patch)
tree888509098544c425e0032f5952cce28d077df517
parent201b976824faba8a7d56b636c7d5b147a1cb2888 (diff)
Fix cutting camera name short
Task-number: QT3DS-978 Change-Id: I251bf24fe490aba950a6545fdeecff36d7e6488d Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io> Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
-rw-r--r--src/Authoring/Studio/_Win/UI/EditCameraBar.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/Authoring/Studio/_Win/UI/EditCameraBar.cpp b/src/Authoring/Studio/_Win/UI/EditCameraBar.cpp
index 4f658da4..8705e96f 100644
--- a/src/Authoring/Studio/_Win/UI/EditCameraBar.cpp
+++ b/src/Authoring/Studio/_Win/UI/EditCameraBar.cpp
@@ -225,9 +225,14 @@ void CEditCameraBar::OnCustomizeToolbar()
{
// Create the combo box
addWidget(m_CameraSelector = new QComboBox);
+#if (defined Q_OS_MACOS)
+ // There is a "selected" icon in the popup, and automatic scaling does not work for some reason
+ m_CameraSelector->setMinimumContentsLength(tr("Scene Camera View").length() + 1);
+#else
+ m_CameraSelector->setSizeAdjustPolicy(QComboBox::AdjustToContents);
+#endif
// We need to specify accessibleName and objectName for the combobox, as it's in the toolbar,
// and we want to use a different style for it.
m_CameraSelector->setAccessibleName(QStringLiteral("cameraSelector"));
m_CameraSelector->setObjectName(QStringLiteral("cameraSelector"));
- m_CameraSelector->setMinimumWidth(145);
}