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)
|
||||
|
||||
color: '#aa000000'
|
||||
clip: true
|
||||
color: '#000000'
|
||||
|
||||
height: 50 * pgst.scalef
|
||||
|
||||
|
@ -39,15 +40,27 @@ Rectangle {
|
|||
}
|
||||
|
||||
Rectangle {
|
||||
height: parent.height * 0.9
|
||||
width: height
|
||||
|
||||
color: '#aaffffff'
|
||||
id: fillBackground
|
||||
color: '#333333'
|
||||
height: parent.height * 0.8
|
||||
width: parent.width * (parent.value - parent.min) / (parent.max - parent.min)
|
||||
|
||||
anchors {
|
||||
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 {
|
||||
width: playerPage.width
|
||||
value: player.playbackRate
|
||||
min: 0.5
|
||||
max: 3.0
|
||||
value: player.position
|
||||
min: 0
|
||||
max: player.duration
|
||||
onValueChangeRequested: {
|
||||
player.playbackRate = newValue
|
||||
value = player.playbackRate
|
||||
player.seekAndSync(newValue);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue