aboutsummaryrefslogtreecommitdiffstats
path: root/src/quickcontrols/fusion/Tumbler.qml
diff options
context:
space:
mode:
Diffstat (limited to 'src/quickcontrols/fusion/Tumbler.qml')
-rw-r--r--src/quickcontrols/fusion/Tumbler.qml8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/quickcontrols/fusion/Tumbler.qml b/src/quickcontrols/fusion/Tumbler.qml
index 447765dce7..4a5ccd8348 100644
--- a/src/quickcontrols/fusion/Tumbler.qml
+++ b/src/quickcontrols/fusion/Tumbler.qml
@@ -15,6 +15,8 @@ T.Tumbler {
implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
implicitContentHeight + topPadding + bottomPadding)
+ readonly property real __delegateHeight: availableHeight / visibleItemCount
+
delegate: Text {
text: modelData
color: control.palette.windowText
@@ -34,13 +36,11 @@ 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
}
}