aboutsummaryrefslogtreecommitdiff
path: root/src/service.vala
diff options
context:
space:
mode:
authorLars Uebernickel <lars.uebernickel@canonical.com>2014-03-20 08:58:06 +0000
committerCI bot <ps-jenkins@lists.canonical.com>2014-03-20 08:58:06 +0000
commit0e7edc660274e02dcc402c27470360931b9c4b87 (patch)
treefd478df45f3b19a0277d795b06d6217c58106c8e /src/service.vala
parentecc5c9ca2ee4ce8f92bd79d3a3a99956f239f63d (diff)
parent00ff3526be3255b0a942828119761fe0e70c02b5 (diff)
downloadayatana-indicator-sound-0e7edc660274e02dcc402c27470360931b9c4b87.tar.gz
ayatana-indicator-sound-0e7edc660274e02dcc402c27470360931b9c4b87.tar.bz2
ayatana-indicator-sound-0e7edc660274e02dcc402c27470360931b9c4b87.zip
Scale volume in notifications when allow-amplified-volume is set Fixes: 1293163
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 507a39e..60b48fa 100644
--- a/src/service.vala
+++ b/src/service.vala
@@ -143,7 +143,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 ();
}