Warning, /plasma/qqc2-breeze-style/style/qtquickcontrols/Tumbler.qml is written in an unsupported language. File is not indexed.
0001 // NOTE: replace this
0002 import QtQuick
0003 import QtQuick.Controls as Controls
0004 import QtQuick.Controls.impl
0005 import QtQuick.Templates as T
0006
0007 T.Tumbler {
0008 id: control
0009
0010 implicitWidth: Math.max(implicitBackgroundWidth + leftInset + rightInset,
0011 implicitContentWidth + leftPadding + rightPadding) || 60 // ### remove 60 in Qt 6
0012 implicitHeight: Math.max(implicitBackgroundHeight + topInset + bottomInset,
0013 implicitContentHeight + topPadding + bottomPadding) || 200 // ### remove 200 in Qt 6
0014
0015 delegate: Text {
0016 text: modelData
0017 color: control.visualFocus ? control.palette.highlight : control.palette.text
0018 font: control.font
0019 opacity: 1.0 - Math.abs(Tumbler.displacement) / (control.visibleItemCount / 2)
0020 horizontalAlignment: Text.AlignHCenter
0021 verticalAlignment: Text.AlignVCenter
0022 }
0023
0024 contentItem: TumblerView {
0025 implicitWidth: 60
0026 implicitHeight: 200
0027 model: control.model
0028 delegate: control.delegate
0029 path: Path {
0030 startX: control.contentItem.width / 2
0031 startY: -control.contentItem.delegateHeight / 2
0032 PathLine {
0033 x: control.contentItem.width / 2
0034 y: (control.visibleItemCount + 1) * control.contentItem.delegateHeight - control.contentItem.delegateHeight / 2
0035 }
0036 }
0037
0038 property real delegateHeight: control.availableHeight / control.visibleItemCount
0039 }
0040 }