From 41b5a91e75cff0297a6aa3d5a81225aac3a8e4d5 Mon Sep 17 00:00:00 2001 From: Thomas Perl Date: Fri, 7 Feb 2014 00:28:13 +0100 Subject: [PATCH] Use playback color for player page slider --- touch/PSlider.qml | 5 +++-- touch/PlayerPage.qml | 2 ++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/touch/PSlider.qml b/touch/PSlider.qml index 478c1db..0257843 100644 --- a/touch/PSlider.qml +++ b/touch/PSlider.qml @@ -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 diff --git a/touch/PlayerPage.qml b/touch/PlayerPage.qml index 39ba6e2..9353084 100644 --- a/touch/PlayerPage.qml +++ b/touch/PlayerPage.qml @@ -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); }