Touch UI: Playback position slider + new slider theme
This commit is contained in:
parent
7f5aa932f7
commit
9b9c70b99a
2 changed files with 24 additions and 12 deletions
|
@ -29,7 +29,8 @@ Rectangle {
|
||||||
|
|
||||||
signal valueChangeRequested(real newValue)
|
signal valueChangeRequested(real newValue)
|
||||||
|
|
||||||
color: '#aa000000'
|
clip: true
|
||||||
|
color: '#000000'
|
||||||
|
|
||||||
height: 50 * pgst.scalef
|
height: 50 * pgst.scalef
|
||||||
|
|
||||||
|
@ -39,15 +40,27 @@ Rectangle {
|
||||||
}
|
}
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
height: parent.height * 0.9
|
id: fillBackground
|
||||||
width: height
|
color: '#333333'
|
||||||
|
height: parent.height * 0.8
|
||||||
color: '#aaffffff'
|
width: parent.width * (parent.value - parent.min) / (parent.max - parent.min)
|
||||||
|
|
||||||
anchors {
|
anchors {
|
||||||
verticalCenter: parent.verticalCenter
|
verticalCenter: parent.verticalCenter
|
||||||
left: parent.left
|
}
|
||||||
leftMargin: parent.width * (parent.value - parent.min) / (parent.max - parent.min)
|
}
|
||||||
|
|
||||||
|
Rectangle {
|
||||||
|
height: parent.height * 0.9
|
||||||
|
width: height
|
||||||
|
radius: width / 2
|
||||||
|
|
||||||
|
color: '#666666'
|
||||||
|
|
||||||
|
anchors {
|
||||||
|
verticalCenter: parent.verticalCenter
|
||||||
|
left: fillBackground.right
|
||||||
|
leftMargin: -(width / 2)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -70,12 +70,11 @@ SlidePage {
|
||||||
|
|
||||||
PSlider {
|
PSlider {
|
||||||
width: playerPage.width
|
width: playerPage.width
|
||||||
value: player.playbackRate
|
value: player.position
|
||||||
min: 0.5
|
min: 0
|
||||||
max: 3.0
|
max: player.duration
|
||||||
onValueChangeRequested: {
|
onValueChangeRequested: {
|
||||||
player.playbackRate = newValue
|
player.seekAndSync(newValue);
|
||||||
value = player.playbackRate
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue