aboutsummaryrefslogtreecommitdiffstats
path: root/src/quickcontrols/basic
diff options
context:
space:
mode:
Diffstat (limited to 'src/quickcontrols/basic')
-rw-r--r--src/quickcontrols/basic/ComboBox.qml1
-rw-r--r--src/quickcontrols/basic/Tumbler.qml9
2 files changed, 6 insertions, 4 deletions
diff --git a/src/quickcontrols/basic/ComboBox.qml b/src/quickcontrols/basic/ComboBox.qml
index 8cd148e9fe..4d8bbb372d 100644
--- a/src/quickcontrols/basic/ComboBox.qml
+++ b/src/quickcontrols/basic/ComboBox.qml
@@ -80,6 +80,7 @@ T.ComboBox {
height: Math.min(contentItem.implicitHeight, control.Window.height - topMargin - bottomMargin)
topMargin: 6
bottomMargin: 6
+ palette: control.palette
contentItem: ListView {
clip: true
diff --git a/src/quickcontrols/basic/Tumbler.qml b/src/quickcontrols/basic/Tumbler.qml
index d3d1254fea..4bd5c5fed2 100644
--- a/src/quickcontrols/basic/Tumbler.qml
+++ b/src/quickcontrols/basic/Tumbler.qml
@@ -13,6 +13,8 @@ T.Tumbler {
implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
implicitContentHeight + topPadding + bottomPadding)
+ readonly property real __delegateHeight: availableHeight / visibleItemCount
+
delegate: Text {
text: modelData
color: control.visualFocus ? control.palette.highlight : control.palette.text
@@ -35,13 +37,12 @@ T.Tumbler {
delegate: control.delegate
path: Path {
startX: control.contentItem.width / 2
- startY: -control.contentItem.delegateHeight / 2
+ startY: -control.__delegateHeight / 2
+
PathLine {
x: control.contentItem.width / 2
- y: (control.visibleItemCount + 1) * control.contentItem.delegateHeight - control.contentItem.delegateHeight / 2
+ y: (control.visibleItemCount + 1) * control.__delegateHeight - control.__delegateHeight / 2
}
}
-
- property real delegateHeight: control.availableHeight / control.visibleItemCount
}
}