[gnome-shell] VolumeStatus: change the definition of high/medium/low
- From: Giovanni Campagna <gcampagna src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] VolumeStatus: change the definition of high/medium/low
- Date: Sun, 6 Feb 2011 11:03:38 +0000 (UTC)
commit ad27b9eda55e153931db08e4456b8592344eff57
Author: Giovanni Campagna <gcampagna src gnome org>
Date: Sat Feb 5 19:42:50 2011 +0100
VolumeStatus: change the definition of high/medium/low
Do it the same way as gnome-settings-daemon, so that OSD does not
look "out-of-sync" with the status icon.
https://bugzilla.gnome.org/show_bug.cgi?id=641538
js/ui/status/volume.js | 6 +++---
1 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/js/ui/status/volume.js b/js/ui/status/volume.js
index 9211968..f347607 100644
--- a/js/ui/status/volume.js
+++ b/js/ui/status/volume.js
@@ -164,10 +164,10 @@ Indicator.prototype = {
if (volume <= 0) {
return 'audio-volume-muted';
} else {
- let v = volume / VOLUME_MAX;
- if (v < 0.33)
+ let n = Math.floor(3 * volume / VOLUME_MAX) + 1;
+ if (n < 2)
return 'audio-volume-low';
- if (v > 0.8)
+ if (n >= 3)
return 'audio-volume-high';
return 'audio-volume-medium';
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]