diff options
author | Lars Uebernickel <lars.uebernickel@canonical.com> | 2014-03-18 09:51:40 +0100 |
---|---|---|
committer | Lars Uebernickel <lars.uebernickel@canonical.com> | 2014-03-18 09:51:40 +0100 |
commit | 00ff3526be3255b0a942828119761fe0e70c02b5 (patch) | |
tree | 0a4e211e2364af6fad33b45816ce2619b78a9348 | |
parent | b51fa335562a99e80ec30daf89d0715e084d50d0 (diff) | |
download | ayatana-indicator-sound-00ff3526be3255b0a942828119761fe0e70c02b5.tar.gz ayatana-indicator-sound-00ff3526be3255b0a942828119761fe0e70c02b5.tar.bz2 ayatana-indicator-sound-00ff3526be3255b0a942828119761fe0e70c02b5.zip |
Scale volume in notifications when allow-amplified-volume is set
-rw-r--r-- | src/service.vala | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/service.vala b/src/service.vala index 970867f..4c4f6e6 100644 --- a/src/service.vala +++ b/src/service.vala @@ -141,7 +141,7 @@ public class IndicatorSound.Service: Object { icon = "notification-audio-volume-high"; this.notification.update ("indicator-sound", "", icon); - this.notification.set_hint_int32 ("value", ((int32) (100 * v)).clamp (-1, 101)); + this.notification.set_hint_int32 ("value", ((int32) (100 * v / this.max_volume)).clamp (-1, 101)); try { this.notification.show (); } |