diff options
author | Ted Gould <ted@gould.cx> | 2014-10-15 09:15:26 -0500 |
---|---|---|
committer | Ted Gould <ted@gould.cx> | 2014-10-15 09:15:26 -0500 |
commit | c104a2064c6e328a20d134d5985828ba913b2bce (patch) | |
tree | fd1fc33f62bbde5a306cbafc0babf446f6bfbccb | |
parent | 714687351a4eb93f3fc712ef3ce2459371075142 (diff) | |
parent | 46c7d4c1cb1a6552ba205beaf233d66dcd4fc8a7 (diff) | |
download | ayatana-indicator-sound-c104a2064c6e328a20d134d5985828ba913b2bce.tar.gz ayatana-indicator-sound-c104a2064c6e328a20d134d5985828ba913b2bce.tar.bz2 ayatana-indicator-sound-c104a2064c6e328a20d134d5985828ba913b2bce.zip |
Fixes for icon values and manual tests
-rw-r--r-- | src/service.vala | 2 | ||||
-rw-r--r-- | src/volume-control.vala | 8 | ||||
-rw-r--r-- | tests/manual | 4 |
3 files changed, 9 insertions, 5 deletions
diff --git a/src/service.vala b/src/service.vala index 64a89fd..bd44b0d 100644 --- a/src/service.vala +++ b/src/service.vala @@ -186,6 +186,8 @@ public class IndicatorSound.Service: Object { double v = this.volume_control.get_volume () + volume_step_percentage * delta; this.volume_control.set_volume (v.clamp (0.0, this.max_volume)); + /* TODO: Don't want to mess up the desktop today, but we should remove this + scrolling change and merge that into volume control's notification */ if (this.notification != null) { string icon; if (v <= 0.0) diff --git a/src/volume-control.vala b/src/volume-control.vala index fb29d52..b40189b 100644 --- a/src/volume-control.vala +++ b/src/volume-control.vala @@ -617,11 +617,13 @@ public class VolumeControl : Object /* Choose an icon */ string icon = "audio-volume-muted"; - if (volume > 0.0 && volume <= 0.33) + if (volume <= 0.0) + icon = "audio-volume-muted"; + else if (volume <= 0.3) icon = "audio-volume-low"; - if (volume > 0.33 && volume <= 0.66) + else if (volume <= 0.7) icon = "audio-volume-medium"; - if (volume > 0.66 && volume <= 1.0) + else icon = "audio-volume-high"; /* Choose a sound */ diff --git a/tests/manual b/tests/manual index f69cf14..0df4186 100644 --- a/tests/manual +++ b/tests/manual @@ -47,13 +47,13 @@ Test-case indicator-sound/unity8-high-volume <dd>The slider should be in the middle of the scale</dd> <dt>Increase the volume once using HW keys if available</dt> <dd>A notification bubble should appear with the sound volume</dd> - <dd>The text on the notification should read "Volume"</dd> + <dd>There should be no text on the notification</dd> <dt>Increase the volume using HW keys until it is roughly 90% of the range</dt> <dd>A notification bubble should appear with the sound volume</dd> <dd>The text on the notification should read "High volume"</dd> <dd>The range on the notification bubble should have a different color signifying the higher volume</dd> <dt>Decrease the volume using HW keys until it is roughly 50% of the range</dt> <dd>A notification bubble should appear with the sound volume</dd> - <dd>The text on the notification should read "Volume"</dd> + <dd>There should be no text on the notification</dd> <dd>The range on the notification bubble should have a standard color</dd> </dl> |