summaryrefslogtreecommitdiffstats
path: root/app/wifi
diff options
context:
space:
mode:
authorTasuku Suzuki <tasuku.suzuki@qt.io>2016-12-22 19:12:28 +0900
committerJan-Simon Moeller <jsmoeller@linuxfoundation.org>2016-12-22 13:59:36 +0000
commitd05d7037a6b907a72e3dde98196cb0158d8c3fce (patch)
tree3ee34b969ba5a4b62c74e2b41bb5e482faa4f5a0 /app/wifi
parentae24499acd55d7d5af513061d9aa2e56b8a99f83 (diff)
Wifi: Improve signal icon handling
Change-Id: I72fd21ef0800bc35617d5bb38ceee7de2dca2350 Signed-off-by: Tasuku Suzuki <tasuku.suzuki@qt.io>
Diffstat (limited to 'app/wifi')
-rw-r--r--app/wifi/Wifi.qml27
1 files changed, 11 insertions, 16 deletions
diff --git a/app/wifi/Wifi.qml b/app/wifi/Wifi.qml
index 43e32b7..afcc019 100644
--- a/app/wifi/Wifi.qml
+++ b/app/wifi/Wifi.qml
@@ -84,24 +84,19 @@ SettingPage {
//height: 50
id: icon
source: {
+ var svg
+ if (strength < 30)
+ svg = "1Bar"
+ else if (strength < 50)
+ svg = "2Bars"
+ else if (strength < 70)
+ svg = "3Bars"
+ else
+ svg = "Full"
if (securityType(security) === "unsecured") {
- if (strength < 30)
- return "images/HMI_Settings_Wifi_1Bar.svg"
- else if (strength < 50)
- return "images/HMI_Settings_Wifi_2Bars.svg"
- else if (strength < 70)
- return "images/HMI_Settings_Wifi_3Bars.svg"
- else
- return "images/HMI_Settings_Wifi_Full.svg"
+ return 'images/HMI_Settings_Wifi_%1.svg'.arg(svg)
} else {
- if (strength < 30)
- return "images/HMI_Settings_Wifi_Locked_1Bar.svg"
- else if (strength < 50)
- return "images/HMI_Settings_Wifi_Locked_2Bars.svg"
- else if (strength < 70)
- return "images/HMI_Settings_Wifi_Locked_3Bars.svg"
- else
- return "images/HMI_Settings_Wifi_Locked_Full.svg"
+ return 'images/HMI_Settings_Wifi_Locked_%1.svg'.arg(svg)
}
}
}