From f76c009a890451e33ee706ad2551ebbec1eb415b Mon Sep 17 00:00:00 2001 From: Henning Gruendl Date: Fri, 3 Feb 2023 12:12:30 +0100 Subject: [PATCH] QmlDesigner: Fix ComboBox popup offset Change-Id: I44fff85f231695250e530daf2e6474055d4acf3d Reviewed-by: Brook Cronin Reviewed-by: Reviewed-by: Thomas Hartmann --- .../imports/StudioControls/ComboBox.qml | 4 ++-- .../imports/StudioControls/TopLevelComboBox.qml | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioControls/ComboBox.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioControls/ComboBox.qml index 5853852c8c8..1e4ec42ca22 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioControls/ComboBox.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioControls/ComboBox.qml @@ -184,9 +184,9 @@ T.ComboBox { popup: T.Popup { id: comboBoxPopup - x: actionIndicator.width + control.style.borderWidth + x: actionIndicator.width y: control.height - width: control.width - actionIndicator.width - control.style.borderWidth * 2 + width: control.width - actionIndicator.width // TODO Setting the height on the popup solved the problem with the popup of height 0, // but it has the problem that it sometimes extend over the border of the actual window // and is then cut off. diff --git a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioControls/TopLevelComboBox.qml b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioControls/TopLevelComboBox.qml index dd6e810c324..27887194412 100644 --- a/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioControls/TopLevelComboBox.qml +++ b/share/qtcreator/qmldesigner/propertyEditorQmlSources/imports/StudioControls/TopLevelComboBox.qml @@ -21,7 +21,7 @@ T.ComboBox { width: control.style.controlSize.width height: control.style.controlSize.height - leftPadding: control.style.borderWidth + leftPadding: 0 rightPadding: popupIndicator.width + control.style.borderWidth font.pixelSize: control.style.baseFontSize