Use playback color for player page slider

This commit is contained in:
Thomas Perl 2014-02-07 00:28:13 +01:00
parent e05f13225a
commit 41b5a91e75
2 changed files with 5 additions and 2 deletions

View file

@ -26,6 +26,7 @@ Rectangle {
property real value
property real min: 0.0
property real max: 1.0
property color fillColor: '#333333'
property real displayedValue: mouseArea.pressed ? temporaryValue : value
property real temporaryValue
@ -52,7 +53,7 @@ Rectangle {
Rectangle {
id: fillBackground
color: '#333333'
color: slider.fillColor
height: parent.height * 0.8
width: parent.width * (parent.displayedValue - parent.min) / (parent.max - parent.min)
@ -66,7 +67,7 @@ Rectangle {
width: height
radius: width / 2
color: '#666666'
color: Qt.lighter(slider.fillColor, 1.5)
anchors {
verticalCenter: parent.verticalCenter

View file

@ -21,6 +21,7 @@
import QtQuick 2.0
import 'common/util.js' as Util
import 'common/constants.js' as Constants
SlidePage {
id: playerPage
@ -111,6 +112,7 @@ SlidePage {
value: player.position
min: 0
max: player.duration
fillColor: Constants.colors.playback
onValueChangeRequested: {
player.seekAndSync(newValue);
}