Fix horizontal scrolling to be row independent
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import QtQuick 2.12
|
||||
import QtQuick.Controls 1.4
|
||||
|
||||
import QtQuick.Controls 2.15
|
||||
|
||||
Column {
|
||||
property var title
|
||||
@@ -8,6 +8,7 @@ Column {
|
||||
property var repeaterModel
|
||||
property bool elemSelected
|
||||
property int xIndex
|
||||
width: parent.width
|
||||
Item {
|
||||
width: 10
|
||||
height: 20
|
||||
@@ -15,13 +16,7 @@ Column {
|
||||
Row {
|
||||
Item {
|
||||
height: parent.height
|
||||
width: 16 + (xIndex * 270)
|
||||
Behavior on width {
|
||||
NumberAnimation {
|
||||
duration: 200
|
||||
easing.type: Easing.Linear
|
||||
}
|
||||
}
|
||||
width: 16
|
||||
}
|
||||
Text {
|
||||
text: title
|
||||
@@ -33,13 +28,33 @@ Column {
|
||||
width: 10
|
||||
height: 15
|
||||
}
|
||||
Row {
|
||||
Repeater {
|
||||
id: repeater
|
||||
property var provider: modelData
|
||||
model: repeaterModel
|
||||
Show {
|
||||
show: provider.getShow(modelData)
|
||||
ScrollView {
|
||||
width: parent.width
|
||||
height: 400
|
||||
ScrollBar.horizontal.position: xIndex * 0.135
|
||||
Behavior on ScrollBar.horizontal.position {
|
||||
NumberAnimation {
|
||||
duration: 200
|
||||
easing.type: Easing.Linear
|
||||
}
|
||||
}
|
||||
Flickable {
|
||||
clip: true
|
||||
Column {
|
||||
Item {
|
||||
width: parent.width
|
||||
height: 20
|
||||
}
|
||||
Row {
|
||||
Repeater {
|
||||
id: repeater
|
||||
property var provider: modelData
|
||||
model: repeaterModel
|
||||
Show {
|
||||
show: provider.getShow(modelData)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user