summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHenning Gruendl <henning.gruendl@qt.io>2021-11-30 17:25:15 +0100
committerHenning Gründl <henning.gruendl@qt.io>2021-12-01 09:09:25 +0000
commitf79a93dc2b5a1f0fa182eaa67f2ef8e1024af782 (patch)
treee41f83964f5fb0221fba89b802adbb892f0ed166
parentda192fb1e862ddc0e6c3a37f507c1a0fc1d236b1 (diff)
downloadqt-creator-f79a93dc2b5a1f0fa182eaa67f2ef8e1024af782.tar.gz
QmlDesigner: Hide ComboBox ScrollBar if not needed
Change-Id: I1e8d9917b7b966b6c4e68459185c54dda7d21015 Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
-rw-r--r--share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioControls/ComboBox.qml4
1 files changed, 3 insertions, 1 deletions
diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioControls/ComboBox.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioControls/ComboBox.qml
index 98fdccddb0..bb8166326a 100644
--- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioControls/ComboBox.qml
+++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioControls/ComboBox.qml
@@ -203,13 +203,15 @@ T.ComboBox {
| T.Popup.CloseOnReleaseOutsideParent
contentItem: ListView {
+ id: listView
clip: true
- implicitHeight: contentHeight
+ implicitHeight: listView.contentHeight
model: myComboBox.popup.visible ? myComboBox.delegateModel : null
currentIndex: myComboBox.highlightedIndex
boundsBehavior: Flickable.StopAtBounds
ScrollBar.vertical: ScrollBar {
id: comboBoxPopupScrollBar
+ visible: listView.height < listView.contentHeight
}
}