aboutsummaryrefslogtreecommitdiff
path: root/src/service.vala
diff options
context:
space:
mode:
authorLars Uebernickel <lars.uebernickel@canonical.com>2014-03-18 09:51:40 +0100
committerLars Uebernickel <lars.uebernickel@canonical.com>2014-03-18 09:51:40 +0100
commit00ff3526be3255b0a942828119761fe0e70c02b5 (patch)
tree0a4e211e2364af6fad33b45816ce2619b78a9348 /src/service.vala
parentb51fa335562a99e80ec30daf89d0715e084d50d0 (diff)
downloadayatana-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
Diffstat (limited to 'src/service.vala')
-rw-r--r--src/service.vala2
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 ();
}