aboutsummaryrefslogtreecommitdiff
path: root/src/service.vala
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2015-02-24 09:44:36 -0600
committerTed Gould <ted@gould.cx>2015-02-24 09:44:36 -0600
commitcbe081da93d2a2bd1d44a0fe02e9dab7eccd249d (patch)
tree4a7d84ffd237cef54ca09e9838be0adc778478df /src/service.vala
parente1362e2ddb880fba0c489fd2ceabfe867ba2f2e0 (diff)
downloadayatana-indicator-sound-cbe081da93d2a2bd1d44a0fe02e9dab7eccd249d.tar.gz
ayatana-indicator-sound-cbe081da93d2a2bd1d44a0fe02e9dab7eccd249d.tar.bz2
ayatana-indicator-sound-cbe081da93d2a2bd1d44a0fe02e9dab7eccd249d.zip
Use the max volume attribute to scale the volume measure
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 0c82538..4b2eb92 100644
--- a/src/service.vala
+++ b/src/service.vala
@@ -322,7 +322,7 @@ public class IndicatorSound.Service: Object {
/* Put it all into the notification */
sync_notification.clear_hints ();
sync_notification.update (_("Volume"), volume_label, icon);
- sync_notification.set_hint ("value", (int32)Math.round(volume_control.volume.volume * 100.0));
+ sync_notification.set_hint ("value", (int32)Math.round(volume_control.volume.volume / this.max_volume * 100.0));
sync_notification.set_hint ("x-canonical-value-bar-tint", tint);
sync_notification.set_hint ("x-canonical-private-synchronous", "true");
sync_notification.set_hint ("x-canonical-non-shaped-icon", "true");