Message info
 
To:kde-commits@kde.org From:Shantanu Tushar Subject:[plasma-mediacenter] components/mediacontroller: Make volume slider work Date:Sun, 18 Mar 2012 17:30:39 +0100 (CET)
 

Git commit ec1f547dfa483101709960bb08f3bdbd2a260fc0 by Shantanu Tushar.
Committed on 18/03/2012 at 17:29.
Pushed by shantanu into branch 'master'.

Make volume slider work

M +10 -2 components/mediacontroller/MediaController.qml

http://commits.kde.org/plasma-mediacenter/ec1f547dfa483101709960bb08f3bdbd2a260fc0

diff --git a/components/mediacontroller/MediaController.qml b/components/mediacontroller/MediaController.qml
index b09e849..8d7e8c4 100644
--- a/components/mediacontroller/MediaController.qml
+++ b/components/mediacontroller/MediaController.qml
@@ -108,8 +108,16 @@ PlasmaCore.FrameSvgItem {
height: parent.height
width: volumeButton.checked ? parent.width * 0.2 : 1
visible: volumeButton.checked
-
- onValueChanged: runtimeDataObject.volume = value
+ minimumValue: 0
+ maximumValue: 100
+ value: Math.round(100 * runtimeDataObject.volume)
+
+ Binding {
+ when: volumeSlider.pressed
+ target: runtimeDataObject
+ property: "volume"
+ value: volumeSlider.value * 0.01
+ }
}

PlasmaComponents.ToolButton {