Refactor ContentView to add animated scrolling

This commit is contained in:
2022-09-07 21:03:12 -06:00
parent b9e5b92354
commit 5c8d0dacf5
3 changed files with 95 additions and 50 deletions
@@ -15,7 +15,13 @@ Column {
Row {
Item {
height: parent.height
width: 16
width: 16 + (xIndex * 270)
Behavior on width {
NumberAnimation {
duration: 200
easing.type: Easing.Linear
}
}
}
Text {
text: title
@@ -0,0 +1,40 @@
import QtQuick 2.12
Row {
id: root
property string title
property int year
property string description
Item {
height: parent.height
width: 16
}
Column {
height: parent.height
width: parent.width - 16
spacing: 20
Item {
height: 20
width: parent.width
}
Text {
text: title
font.pointSize: 30
color: "#cdd7d9"
}
Text {
text: year
font.pointSize: 15
color: "#99afb4"
}
Text {
text: description
font.pointSize: 13
color: "#cdd7d9"
width: parent.width * 0.6
wrapMode: Text.WordWrap
maximumLineCount: 4
elide: Text.ElideRight
}
}
}