Fix wiFi signal strength bar display

1. Using root.active?.strength ?? 0 instead of root.networkStrength
2. Added checking wifiStatus === "connected" — only show signal bars if
actually connected
This commit is contained in:
rijaluddina
2026-03-03 04:23:46 +07:00
parent 8bf279e571
commit bbc84b68ef
@@ -36,13 +36,13 @@ Singleton {
property int networkStrength property int networkStrength
property string materialSymbol: root.ethernet property string materialSymbol: root.ethernet
? "lan" ? "lan"
: root.wifiEnabled : (root.wifiEnabled && root.wifiStatus === "connected")
? ( ? (
Network.networkStrength > 83 ? "signal_wifi_4_bar" : (root.active?.strength ?? 0) > 83 ? "signal_wifi_4_bar" :
Network.networkStrength > 67 ? "network_wifi" : (root.active?.strength ?? 0) > 67 ? "network_wifi" :
Network.networkStrength > 50 ? "network_wifi_3_bar" : (root.active?.strength ?? 0) > 50 ? "network_wifi_3_bar" :
Network.networkStrength > 33 ? "network_wifi_2_bar" : (root.active?.strength ?? 0) > 33 ? "network_wifi_2_bar" :
Network.networkStrength > 17 ? "network_wifi_1_bar" : (root.active?.strength ?? 0) > 17 ? "network_wifi_1_bar" :
"signal_wifi_0_bar" "signal_wifi_0_bar"
) )
: (root.wifiStatus === "connecting") : (root.wifiStatus === "connecting")