diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/FlagsComboBox.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/FlagsComboBox.qml index 05a97e7a145..8bc9ad44282 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/FlagsComboBox.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/FlagsComboBox.qml @@ -73,6 +73,7 @@ StudioControls.CustomComboBox { HelperWidgets.Button { text: qsTr("Select All") + width: 80 onClicked: { let allFlags = 0 @@ -84,6 +85,7 @@ StudioControls.CustomComboBox { } HelperWidgets.Button { text: qsTr("Select None") + width: 80 onClicked: root.backendValue.value = 0 } diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/PropertyEditorPane.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/PropertyEditorPane.qml index f35a21f4533..7046ca48e14 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/PropertyEditorPane.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/HelperWidgets/PropertyEditorPane.qml @@ -17,6 +17,7 @@ Rectangle { Component.onCompleted: Controller.mainScrollView = mainScrollView default property alias content: mainColumn.children + property alias scrollView: mainScrollView // Called from C++ to close context menu on focus out function closeContextMenu() { diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioControls/CustomComboBox.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioControls/CustomComboBox.qml index ba39201bdc8..88ebfaadb03 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioControls/CustomComboBox.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioControls/CustomComboBox.qml @@ -12,8 +12,6 @@ StudioControls.ComboBox { required property Component popupComponent - required property Item mainRoot - readonly property int popupHeight: Math.min(800, popupLoader.height + 2) property alias popupItem: popupLoader.item @@ -23,8 +21,8 @@ StudioControls.ComboBox { popup.height: 0 function calculateWindowGeometry() { - let gPos = globalPos(mainRoot.mapFromItem(root, 0, 0)) - let scrRect = screenRect(); + let gPos = globalPos(itemPane.mapFromItem(root, 0, 0)) + let scrRect = screenRect() window.width = Math.max(root.width - root.actionIndicator.width, popupLoader.width + 2) // 2: scrollView left and right 1px margins @@ -70,10 +68,18 @@ StudioControls.ComboBox { } } + Connections { + target: itemPane.scrollView + + function onContentYChanged() { + window.hide() // TODO: a better solution is to move the window instead of hiding + } + } + Window { id: window - flags: Qt.Dialog | Qt.FramelessWindowHint | Qt.WindowStaysOnTopHint + flags: Qt.Tool | Qt.FramelessWindowHint | Qt.WindowStaysOnTopHint onActiveFocusItemChanged: { if (!window.activeFocusItem && !root.hovered && root.popup.opened)