aboutsummaryrefslogtreecommitdiffstats
path: root/src/imports/controls/ComboBox.qml
diff options
context:
space:
mode:
authorJ-P Nurmi <jpnurmi@theqtcompany.com>2016-01-25 11:02:44 +0100
committerJ-P Nurmi <jpnurmi@theqtcompany.com>2016-01-25 11:03:53 +0100
commit5ada1525e03116326a480fb05611904d3484c296 (patch)
treef23822e6b0482012065b9586d95cb8ab5d70c4bf /src/imports/controls/ComboBox.qml
parentf4f5e857447d42738b1b60b5c4184f39df2f1593 (diff)
parent4f1fb09ed70c69e73f2e19f28f4299f4cfbc90dc (diff)
Merge remote-tracking branch 'origin/5.6' into dev
Conflicts: .gitignore src/templates/qquickcombobox_p.h src/templates/qquickmenu_p.h src/templates/qquickmenu_p_p.h src/templates/qquickoverlay_p.h src/templates/qquickpopup.cpp src/templates/qquickpopup_p.h src/templates/qquickstackview_p.cpp Change-Id: I89c7d518697beec0b81ef3a12205286a4f3ccf89
Diffstat (limited to 'src/imports/controls/ComboBox.qml')
-rw-r--r--src/imports/controls/ComboBox.qml40
1 files changed, 17 insertions, 23 deletions
diff --git a/src/imports/controls/ComboBox.qml b/src/imports/controls/ComboBox.qml
index 5be26304..33568699 100644
--- a/src/imports/controls/ComboBox.qml
+++ b/src/imports/controls/ComboBox.qml
@@ -99,35 +99,29 @@ T.ComboBox {
//! [popup]
popup: T.Popup {
- contentItem: Rectangle {
- // TODO: Popup::anchors
- readonly property var above: popup.visible ? control.mapToItem(null, 0, -height + 1) : Qt.point(0, 0)
- readonly property var below: popup.visible ? control.mapToItem(null, 0, control.height - 1) : Qt.point(0, 0)
+ y: control.height - 1
+ implicitWidth: control.width
+ implicitHeight: Math.min(200, listview.contentHeight)
- x: below.x
- y: above.y >= 0 && below.y + height > control.Window.height ? above.y : below.y
- width: control.width
- height: listview.height
-
- ListView {
- id: listview
- width: control.width
- height: Math.min(200, contentHeight)
-
- clip: true
- model: control.delegateModel
- currentIndex: control.highlightedIndex
-
-// ScrollIndicator.vertical: ScrollIndicator { }
- }
+ contentItem: ListView {
+ id: listview
+ clip: true
+ model: control.delegateModel
+ currentIndex: control.highlightedIndex
Rectangle {
- width: parent.width
- height: parent.height
- color: "transparent"
+ z: 10
+ parent: listview
+ width: listview.width
+ height: listview.height
border.color: "#353637"
+ color: "transparent"
}
+
+// ScrollIndicator.vertical: ScrollIndicator { }
}
+
+ background: Rectangle { }
}
//! [popup]
}