diff options
author | Richard Moe Gustavsen <richard.gustavsen@qt.io> | 2020-06-15 14:58:12 +0200 |
---|---|---|
committer | Richard Moe Gustavsen <richard.gustavsen@qt.io> | 2020-06-15 13:45:41 +0000 |
commit | 34435e087ade5073fdee067ce62debdfe8564c41 (patch) | |
tree | be7147b986874eb9ca29e6a6964e1cd79f57a1eb | |
parent | 1084d644d4c2fd21aedb21b3f8ee46a8c352af0f (diff) |
Native style, DefaultComboBox: position popup at correct place
Change 4013c4ee caused a regression after renaming layoutRect
to layoutMargins. This patch will fix the regression
in DefaultComboBox related to that.
Change-Id: I05774b582c750e4614c0a70926613114b259a515
Reviewed-by: Jan Arve Sæther <jan-arve.saether@qt.io>
-rw-r--r-- | src/imports/nativestyle/controls/DefaultComboBox.qml | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/imports/nativestyle/controls/DefaultComboBox.qml b/src/imports/nativestyle/controls/DefaultComboBox.qml index 0ae111fe..ec6fe7c8 100644 --- a/src/imports/nativestyle/controls/DefaultComboBox.qml +++ b/src/imports/nativestyle/controls/DefaultComboBox.qml @@ -102,9 +102,10 @@ T.ComboBox { } popup: T.Popup { - x: control.nativeBackground ? control.background.layoutRect.x : 0 - y: control.nativeBackground ? control.background.layoutRect.y + control.background.layoutRect.height : control.height - width: control.nativeBackground ? control.background.layoutRect.width : control.width + readonly property var layoutMargins: control.nativeBackground ? control.background.layoutMargins : null + x: layoutMargins ? layoutMargins.left : 0 + y: control.height - (layoutMargins ? layoutMargins.bottom : 0) + width: control.width - (layoutMargins ? layoutMargins.left + layoutMargins.right : 0) height: Math.min(contentItem.implicitHeight, control.Window.height - topMargin - bottomMargin) topMargin: 6 bottomMargin: 6 |