mirror of
https://github.com/zoriya/noctalia-shell.git
synced 2026-08-15 18:43:59 +00:00
Wifi: fixed bug where non connected SSID would report as without internet.
This commit is contained in:
@@ -51,7 +51,7 @@ Item {
|
||||
break
|
||||
}
|
||||
}
|
||||
return connected ? NetworkService.signalIcon(signalStrength) : "wifi-off"
|
||||
return connected ? NetworkService.signalIcon(signalStrength, true) : "wifi-off"
|
||||
} catch (error) {
|
||||
Logger.e("Wi-Fi", "Error getting icon:", error)
|
||||
return "signal_wifi_bad"
|
||||
|
||||
@@ -21,7 +21,7 @@ NIconButtonHot {
|
||||
break
|
||||
}
|
||||
}
|
||||
return connected ? NetworkService.signalIcon(signalStrength) : "wifi-off"
|
||||
return connected ? NetworkService.signalIcon(signalStrength, true) : "wifi-off"
|
||||
} catch (error) {
|
||||
Logger.e("Wi-Fi", "Error getting icon:", error)
|
||||
return "signal_wifi_bad"
|
||||
|
||||
@@ -23,7 +23,7 @@ SmartPanel {
|
||||
panelContent: Rectangle {
|
||||
color: Color.transparent
|
||||
|
||||
property real contentPreferredHeight: Math.min(preferredHeight, Math.max(240, mainColumn.implicitHeight + Style.marginL * 2))
|
||||
property real contentPreferredHeight: Math.min(preferredHeight, Math.max(280 * Style.uiScaleRatio, mainColumn.implicitHeight + Style.marginL * 2))
|
||||
|
||||
ColumnLayout {
|
||||
id: mainColumn
|
||||
@@ -247,7 +247,7 @@ SmartPanel {
|
||||
spacing: Style.marginS
|
||||
|
||||
NIcon {
|
||||
icon: NetworkService.signalIcon(modelData.signal)
|
||||
icon: NetworkService.signalIcon(modelData.signal, modelData.connected)
|
||||
pointSize: Style.fontSizeXXL
|
||||
color: modelData.connected ? Color.mPrimary : Color.mOnSurface
|
||||
}
|
||||
|
||||
@@ -222,8 +222,8 @@ Singleton {
|
||||
}
|
||||
|
||||
// Helper functions
|
||||
function signalIcon(signal) {
|
||||
if (root.internetConnectivity === "limited" || root.internetConnectivity === "portal")
|
||||
function signalIcon(signal, isConnected = false) {
|
||||
if (isConnected && (root.internetConnectivity === "limited" || root.internetConnectivity === "portal"))
|
||||
return "world-off"
|
||||
if (signal >= 80)
|
||||
return "wifi"
|
||||
|
||||
Reference in New Issue
Block a user