id: seekSlider
property double duration: 0
property double position: 0
+ property int chaperlineWidth: 2
+ property int chaperlineTextSpacing: 2
signal seekRequested(double position)
Repeater {
model: player.chapterModel
anchors.fill: parent
- delegate: Text {
+ delegate: Rectangle {
+ id: chapterline
+ height: seekSlider.height
+ width: chaperlineWidth
+ color: "yellow"
y: 0
+ x: toPixels(startTime - 0)
+ }
+ }
+
+ Repeater {
+ model: player.chapterModel
+ anchors.fill: parent
+ delegate: Text {
+ y: (index % Math.floor(seekSlider.height / height)) * 15
x: {
console.log("CHAPTER", title, 0, toPixels(startTime - 0), startTime);
- return toPixels(startTime - 0);
+ var x = toPixels(startTime - 0) + chaperlineWidth + chaperlineTextSpacing;
+ if ((x + width) > seekSlider.width) {
+ x = toPixels(startTime - 0) - width - chaperlineWidth - chaperlineTextSpacing;
+ }
+ return x;
}
- width: toPixels(endTime - startTime)
text: title
}
}