summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorATMDA <atdma2600@gmail.com>2025-11-20 08:36:10 -0500
committerATMDA <atdma2600@gmail.com>2025-11-20 08:36:10 -0500
commit5a369702d1e227df0842ad31d8d93710ad068add (patch)
tree2bbfd22223a868c9ab8bc806c088b008e22db19e
parentrefactor: EthernetList styling (diff)
downloadcaelestia-shell-5a369702d1e227df0842ad31d8d93710ad068add.tar.gz
caelestia-shell-5a369702d1e227df0842ad31d8d93710ad068add.tar.bz2
caelestia-shell-5a369702d1e227df0842ad31d8d93710ad068add.zip
controlcenter: updated wireless icons
-rw-r--r--modules/controlcenter/network/WirelessList.qml35
-rw-r--r--utils/Icons.qml32
2 files changed, 23 insertions, 44 deletions
diff --git a/modules/controlcenter/network/WirelessList.qml b/modules/controlcenter/network/WirelessList.qml
index 43d56d2..8159291 100644
--- a/modules/controlcenter/network/WirelessList.qml
+++ b/modules/controlcenter/network/WirelessList.qml
@@ -138,44 +138,11 @@ DeviceList {
id: icon
anchors.centerIn: parent
- text: Icons.getNetworkIcon(modelData.strength)
+ text: Icons.getNetworkIcon(modelData.strength, modelData.isSecure)
font.pointSize: Appearance.font.size.large
fill: modelData.active ? 1 : 0
color: modelData.active ? Colours.palette.m3onPrimaryContainer : Colours.palette.m3onSurface
}
-
- StyledRect {
- id: lockBadge
-
- visible: modelData.isSecure
- anchors.right: parent.right
- anchors.bottom: parent.bottom
- anchors.margins: -Appearance.padding.smaller / 2
-
- implicitWidth: lockIconSize + Appearance.padding.smaller
- implicitHeight: lockIconSize + Appearance.padding.smaller
- radius: Appearance.rounding.full
- color: Colours.palette.m3secondaryContainer
-
- readonly property real lockIconSize: lockIcon.implicitWidth
-
- Elevation {
- anchors.fill: parent
- radius: parent.radius
- z: -1
- level: 2
- }
-
- MaterialIcon {
- id: lockIcon
-
- anchors.centerIn: parent
- text: "lock"
- font.pointSize: Appearance.font.size.small
- fill: 1
- color: Colours.palette.m3onSurface
- }
- }
}
ColumnLayout {
diff --git a/utils/Icons.qml b/utils/Icons.qml
index b3fe8ab..b3f00c5 100644
--- a/utils/Icons.qml
+++ b/utils/Icons.qml
@@ -116,16 +116,28 @@ Singleton {
return fallback;
}
- function getNetworkIcon(strength: int): string {
- if (strength >= 80)
- return "signal_wifi_4_bar";
- if (strength >= 60)
- return "network_wifi_3_bar";
- if (strength >= 40)
- return "network_wifi_2_bar";
- if (strength >= 20)
- return "network_wifi_1_bar";
- return "signal_wifi_0_bar";
+ function getNetworkIcon(strength: int, isSecure = false): string {
+ if (isSecure) {
+ if (strength >= 80)
+ return "network_wifi_locked";
+ if (strength >= 60)
+ return "network_wifi_3_bar_locked";
+ if (strength >= 40)
+ return "network_wifi_2_bar_locked";
+ if (strength >= 20)
+ return "network_wifi_1_bar_locked";
+ return "signal_wifi_0_bar";
+ } else {
+ if (strength >= 80)
+ return "network_wifi";
+ if (strength >= 60)
+ return "network_wifi_3_bar";
+ if (strength >= 40)
+ return "network_wifi_2_bar";
+ if (strength >= 20)
+ return "network_wifi_1_bar";
+ return "signal_wifi_0_bar";
+ }
}
function getBluetoothIcon(icon: string): string {