[gnome-shell] status/network: Use the same signal strength values as GNOME Settings
- From: Marge Bot <marge-bot src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] status/network: Use the same signal strength values as GNOME Settings
- Date: Tue, 2 Mar 2021 23:13:26 +0000 (UTC)
commit 9cd211a99afc87f89214c7d52d744450087c0a82
Author: Remi Salmon <salmon remi gmail com>
Date: Thu Sep 3 22:45:38 2020 +0000
status/network: Use the same signal strength values as GNOME Settings
Be consistent and use the same wifi signal strength thresholds that are
used by Settings to ensure that the signal strengths look the same in
Settings and gnome-shell.
See https://gitlab.gnome.org/GNOME/gnome-control-center/-/blob/master/panels/netwo>
for the values used in Control Center.
Fixes https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/217
Part-of: <https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1432>
js/ui/status/network.js | 17 +++++++++--------
1 file changed, 9 insertions(+), 8 deletions(-)
---
diff --git a/js/ui/status/network.js b/js/ui/status/network.js
index 6b19fad0ec..bb119f690c 100644
--- a/js/ui/status/network.js
+++ b/js/ui/status/network.js
@@ -54,15 +54,16 @@ const PortalHelperIface = loadInterfaceXML('org.gnome.Shell.PortalHelper');
const PortalHelperProxy = Gio.DBusProxy.makeProxyWrapper(PortalHelperIface);
function signalToIcon(value) {
- if (value > 80)
- return 'excellent';
- if (value > 55)
- return 'good';
- if (value > 30)
- return 'ok';
- if (value > 5)
+ if (value < 20)
+ return 'none';
+ else if (value < 40)
return 'weak';
- return 'none';
+ else if (value < 50)
+ return 'ok';
+ else if (value < 80)
+ return 'good';
+ else
+ return 'excellent';
}
function ssidToLabel(ssid) {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]