Use playback color for player page slider
This commit is contained in:
parent
e05f13225a
commit
41b5a91e75
2 changed files with 5 additions and 2 deletions
|
@ -26,6 +26,7 @@ Rectangle {
|
||||||
property real value
|
property real value
|
||||||
property real min: 0.0
|
property real min: 0.0
|
||||||
property real max: 1.0
|
property real max: 1.0
|
||||||
|
property color fillColor: '#333333'
|
||||||
|
|
||||||
property real displayedValue: mouseArea.pressed ? temporaryValue : value
|
property real displayedValue: mouseArea.pressed ? temporaryValue : value
|
||||||
property real temporaryValue
|
property real temporaryValue
|
||||||
|
@ -52,7 +53,7 @@ Rectangle {
|
||||||
|
|
||||||
Rectangle {
|
Rectangle {
|
||||||
id: fillBackground
|
id: fillBackground
|
||||||
color: '#333333'
|
color: slider.fillColor
|
||||||
height: parent.height * 0.8
|
height: parent.height * 0.8
|
||||||
width: parent.width * (parent.displayedValue - parent.min) / (parent.max - parent.min)
|
width: parent.width * (parent.displayedValue - parent.min) / (parent.max - parent.min)
|
||||||
|
|
||||||
|
@ -66,7 +67,7 @@ Rectangle {
|
||||||
width: height
|
width: height
|
||||||
radius: width / 2
|
radius: width / 2
|
||||||
|
|
||||||
color: '#666666'
|
color: Qt.lighter(slider.fillColor, 1.5)
|
||||||
|
|
||||||
anchors {
|
anchors {
|
||||||
verticalCenter: parent.verticalCenter
|
verticalCenter: parent.verticalCenter
|
||||||
|
|
|
@ -21,6 +21,7 @@
|
||||||
import QtQuick 2.0
|
import QtQuick 2.0
|
||||||
|
|
||||||
import 'common/util.js' as Util
|
import 'common/util.js' as Util
|
||||||
|
import 'common/constants.js' as Constants
|
||||||
|
|
||||||
SlidePage {
|
SlidePage {
|
||||||
id: playerPage
|
id: playerPage
|
||||||
|
@ -111,6 +112,7 @@ SlidePage {
|
||||||
value: player.position
|
value: player.position
|
||||||
min: 0
|
min: 0
|
||||||
max: player.duration
|
max: player.duration
|
||||||
|
fillColor: Constants.colors.playback
|
||||||
onValueChangeRequested: {
|
onValueChangeRequested: {
|
||||||
player.seekAndSync(newValue);
|
player.seekAndSync(newValue);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue