X-Git-Url: http://git.tdb.fi/?p=xinema.git;a=blobdiff_plain;f=remote%2Fqml%2Fpages%2FPlaybackPage.qml;h=345960a6c80de994d15c06dc017a865a895804fe;hp=4a487a4f8cd9b80add977b1ad9b3e52931ef7fce;hb=4dd3070fa50882b7ec7a26f7d0994c064c6b29d6;hpb=a1e6d14ce3a5d5415333a4d3def6c5504f4bc49b diff --git a/remote/qml/pages/PlaybackPage.qml b/remote/qml/pages/PlaybackPage.qml index 4a487a4..345960a 100644 --- a/remote/qml/pages/PlaybackPage.qml +++ b/remote/qml/pages/PlaybackPage.qml @@ -49,6 +49,27 @@ Page return str+secs; } + + onDownChanged: + { + if(!down) + streamControl.position = value; + } + } + + IconButton + { + id: playPauseButton + anchors.horizontalCenter: parent.horizontalCenter + property string action: (streamControl.playbackState==StreamControl.Playing ? "pause" : "play") + icon.source: "image://theme/icon-l-"+action + onPressed: + { + if(action=="play") + streamControl.playbackState = StreamControl.Playing; + else if(action=="pause") + streamControl.playbackState = StreamControl.Paused; + } } } @@ -59,7 +80,7 @@ Page onPositionChanged: { if(!slider.down) - slider.value = streamControl.position + slider.value = position; } } }