lena_pi/LenaPi/MediaProgress.qml
2019-04-04 13:44:28 +02:00

52 lines
1.2 KiB
QML

import QtQuick 2.0
import QtQuick.Controls 1.4
import QtQuick.Controls.Styles 1.4
Item {
id: container
property var model
// manually set height
Component.onCompleted: height = childrenRect.height
Label{
anchors.left: progress.left
anchors.bottom: progress.top
font.pointSize: 9
color: "grey"
text: model.pMediaTitle
}
Label{
anchors.right: progress.right
anchors.bottom: progress.top
font.pointSize: 9
color: "grey"
text: model.pTime + " / " + model.pMediaLength
}
ProgressBar{
id: progress
anchors.top: parent.top
anchors.left: parent.left
value: model.pProgress
style:ProgressBarStyle {
background: Rectangle {
radius: 5
color: "white"
border.color: "grey"
border.width: 1
implicitWidth: container.width
implicitHeight: 10
}
progress: Rectangle {
color: "blue"
border.color: "blue"
radius: 5
implicitHeight: 8
}
}
}
}