From fbb508299e0247dc73c255c4107b3ff7ffea393d Mon Sep 17 00:00:00 2001 From: Iktwo Sh Date: Wed, 24 Sep 2014 08:43:11 -0700 Subject: [PATCH] Alternate colors on current time when paused --- qml/PlaybackControls.qml | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/qml/PlaybackControls.qml b/qml/PlaybackControls.qml index daf52d6..9200f0e 100644 --- a/qml/PlaybackControls.qml +++ b/qml/PlaybackControls.qml @@ -101,6 +101,8 @@ Rectangle { } Label { + id: labelPosition + /// TODO: add animation where this flashes if paused Layout.fillWidth: true color: Style.TEXT_SECONDARY_COLOR_DARK @@ -112,6 +114,15 @@ Rectangle { font { pixelSize: 12 * ScreenValues.dp family: Theme.fontFamily + bold: audioElement.playbackState === Audio.PausedState && audioElement.status !== Audio.Stalled + } + + SequentialAnimation { + running: audioElement.playbackState === Audio.PausedState && audioElement.status !== Audio.Stalled + loops: Animation.Infinite + alwaysRunToEnd: true + ColorAnimation { target: labelPosition; properties: "color"; to: Theme.titleBarColor; duration: 750 } + ColorAnimation { target: labelPosition; properties: "color"; to: Style.TEXT_SECONDARY_COLOR_DARK; duration: 750 } } } @@ -135,6 +146,7 @@ Rectangle { height: 48 * ScreenValues.dp width: 48 * ScreenValues.dp + /// TODO: verify this logic source: "qrc:/images/" + Theme.getBestIconSize(Math.min(icon.height, icon.width)) + (audioElement.playbackState == Audio.PlayingState || (audioElement.status == Audio.Buffering || audioElement.status == Audio.Stalled) && audioElement.playbackState != Audio.PausedState ? "pause" : "play") onClicked: {