Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --- "/usr/share/lipstick-jolla-home-qt5/volumecontrol/VolumeControl.qml" 2017-11-02 21:04:52.000000000 +0300
- +++ "/usr/share/lipstick-jolla-home-qt5/volumecontrol/VolumeControl.qml" 2017-11-04 00:33:09.000000000 +0300
- @@ -10,6 +10,7 @@
- import Sailfish.Silica 1.0
- import org.nemomobile.systemsettings 1.0
- import org.nemomobile.configuration 1.0
- +import org.nemomobile.mpris 1.0
- import QtFeedback 5.0
- import "../systemwindow"
- import "../compositor"
- @@ -17,6 +18,8 @@
- SystemWindow {
- id: volumeBar
- + MprisManager { id: mprisManager }
- +
- property bool volumeIncreasing
- property bool lateScreenshotCapture
- property var screenshot
- @@ -453,7 +456,13 @@
- repeat: true
- onTriggered: {
- if (volumeBar.controllingMedia) {
- - volumeControl.volume = volumeControl.volume + (volumeBar.volumeIncreasing ? 1 : -1)
- + if (volumeIncreasing)
- + mprisManager.previous()
- + else
- + mprisManager.next()
- + keyRepeat.stop()
- + keyRepeatDelay.stop()
- + initialChange = 0
- } else {
- profileControl.adjustRingtoneVolume(volumeBar.volumeIncreasing ? 20 : -20)
- }
- @@ -488,14 +497,10 @@
- volumeBar.volumeIncreasing = (key == Qt.Key_VolumeUp)
- if (volumeBar.controllingMedia) {
- - if (volumeIncreasing)
- - initialChange = volumeControl.volume === volumeControl.maximumVolume ? 0 : -1 / (volumeControl.maximumVolume+1)
- - else
- - initialChange = volumeControl.volume === 0 ? 0 : 1 / (volumeControl.maximumVolume+1)
- -
- + initialChange = 0
- + baseVolume = volumeControl.volume
- keyRepeat.stop()
- keyRepeatDelay.restart()
- - volumeControl.volume = volumeControl.volume + (volumeBar.volumeIncreasing ? 1 : -1)
- } else {
- if (volumeControl.windowVisible) {
- if (volumeIncreasing)
- @@ -518,7 +523,14 @@
- onVolumeKeyReleased: {
- initialChange = 0
- if (volumeBar.controllingMedia)
- - baseVolume = volumeControl.volume
- + keyRepeat.stop()
- + keyRepeatDelay.stop()
- + if (volumeIncreasing)
- + initialChange = volumeControl.volume === volumeControl.maximumVolume ? 0 : -1 / (volumeControl.maximumVolume+1)
- + else
- + initialChange = volumeControl.volume === 0 ? 0 : 1 / (volumeControl.maximumVolume+1)
- + volumeControl.volume = volumeControl.volume + (volumeBar.volumeIncreasing ? 1 : -1)
- +
- if (volumeBar.volumeIncreasing == (key == Qt.Key_VolumeUp)) {
- // Handle pressing both buttons and releasing the first, though
- // in that case keyRepeat is probably already stopped by screenshotTimer
Add Comment
Please, Sign In to add comment