Commit e15e82b5 authored by Sergey Chupligin's avatar Sergey Chupligin

[Statusbar] Indicators update

parent d44f255d
...@@ -85,6 +85,16 @@ Item { ...@@ -85,6 +85,16 @@ Item {
key: "Cellular.RegistrationStatus" key: "Cellular.RegistrationStatus"
} }
ContextProperty {
id: bluetoothEnabled
key: "Bluetooth.Enabled"
}
ContextProperty {
id: bluetoothConnected
key: "Bluetooth.Connected"
}
NetworkManager { NetworkManager {
id: networkManager id: networkManager
function updateTechnologies() { function updateTechnologies() {
...@@ -181,15 +191,15 @@ Item { ...@@ -181,15 +191,15 @@ Item {
if (networkManager.defaultRoute.type !== "wifi") if (networkManager.defaultRoute.type !== "wifi")
return "image://theme/icon_wifi_0" return "image://theme/icon_wifi_0"
if (networkManager.defaultRoute.strength >= 59) { if (networkManager.defaultRoute.strength >= 59) {
return "image://theme/icon_wifi_normal4" return "image://theme/icon_wifi_focused4"
} else if (networkManager.defaultRoute.strength >= 55) { } else if (networkManager.defaultRoute.strength >= 55) {
return "image://theme/icon_wifi_normal3" return "image://theme/icon_wifi_focused3"
} else if (networkManager.defaultRoute.strength >= 50) { } else if (networkManager.defaultRoute.strength >= 50) {
return "image://theme/icon_wifi_normal2" return "image://theme/icon_wifi_focused2"
} else if (networkManager.defaultRoute.strength >= 40) { } else if (networkManager.defaultRoute.strength >= 40) {
return "image://theme/icon_wifi_normal1" return "image://theme/icon_wifi_focused1"
} else { } else {
return "image://theme/icon_wifi_0" return "image://theme/icon_wifi_normal4"
} }
} else { } else {
return "image://theme/icon_wifi_0" return "image://theme/icon_wifi_0"
...@@ -198,8 +208,10 @@ Item { ...@@ -198,8 +208,10 @@ Item {
panel: WifiPanel {} panel: WifiPanel {}
} }
StatusbarItem { StatusbarItem {
id: bluetootIndicator
iconSize: root.height/2 iconSize: root.height/2
source: "image://theme/icon_bt_normal" source: (bluetoothConnected.value) ? "image://theme/icon_bt_focused" : "image://theme/icon_bt_normal"
visible: bluetoothEnabled.value
} }
StatusbarItem { StatusbarItem {
iconSize: root.height/2 iconSize: root.height/2
......
...@@ -25,12 +25,6 @@ Item { ...@@ -25,12 +25,6 @@ Item {
panel_loader.sourceComponent = panel panel_loader.sourceComponent = panel
panel_loader.visible = !panel_loader.visible panel_loader.visible = !panel_loader.visible
} }
if (icon.source.toString().match("normal")) {
icon.source = icon.source.toString().replace("normal","focused")
} else {
icon.source = icon.source.toString().replace("focused","normal")
}
} }
} }
} }
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment