diff options
| author | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-06-05 21:47:30 +1000 |
|---|---|---|
| committer | 2 * r + 2 * t <61896496+soramanew@users.noreply.github.com> | 2025-06-05 21:47:30 +1000 |
| commit | 017b1b4ce017600953f35a528660cca1f67dc86a (patch) | |
| tree | 45f82a1f7a7a4319107e94797e67f2dd4f2669a6 | |
| parent | popouts: battery add perf degradation warning (diff) | |
| download | caelestia-shell-017b1b4ce017600953f35a528660cca1f67dc86a.tar.gz caelestia-shell-017b1b4ce017600953f35a528660cca1f67dc86a.tar.bz2 caelestia-shell-017b1b4ce017600953f35a528660cca1f67dc86a.zip | |
feat: network popout
Also qstr dashboard performance pane labels
| -rw-r--r-- | modules/bar/Content.qml | 6 | ||||
| -rw-r--r-- | modules/bar/components/StatusIcons.qml | 2 | ||||
| -rw-r--r-- | modules/bar/popouts/Content.qml | 5 | ||||
| -rw-r--r-- | modules/bar/popouts/Network.qml | 22 | ||||
| -rw-r--r-- | modules/dashboard/Performance.qml | 12 |
5 files changed, 41 insertions, 6 deletions
diff --git a/modules/bar/Content.qml b/modules/bar/Content.qml index 1032050..2531f4d 100644 --- a/modules/bar/Content.qml +++ b/modules/bar/Content.qml @@ -14,12 +14,18 @@ StyledRect { function checkPopout(y: real): var { const aw = activeWindow.child; const awy = activeWindow.y + aw.y; + const n = statusIconsInner.network; + const ny = statusIcons.y + statusIconsInner.y + n.y; const b = statusIconsInner.battery; const by = statusIcons.y + statusIconsInner.y + b.y; if (y >= awy && y <= awy + aw.implicitHeight) { Popouts.currentName = "activewindow"; Popouts.currentCenter = Qt.binding(() => activeWindow.y + aw.y + aw.implicitHeight / 2); Popouts.hasCurrent = true; + } else if (y >= ny && y <= ny + n.implicitHeight) { + Popouts.currentName = "network"; + Popouts.currentCenter = Qt.binding(() => statusIcons.y + statusIconsInner.y + n.y + n.implicitHeight / 2); + Popouts.hasCurrent = true; } else if (y >= by && y <= by + b.implicitHeight) { Popouts.currentName = "battery"; Popouts.currentCenter = Qt.binding(() => statusIcons.y + statusIconsInner.y + b.y + b.implicitHeight / 2); diff --git a/modules/bar/components/StatusIcons.qml b/modules/bar/components/StatusIcons.qml index d2dbe2f..d4dba6c 100644 --- a/modules/bar/components/StatusIcons.qml +++ b/modules/bar/components/StatusIcons.qml @@ -10,6 +10,8 @@ Item { id: root property color colour: Colours.palette.m3secondary + + readonly property Item network: network readonly property Item battery: battery clip: true diff --git a/modules/bar/popouts/Content.qml b/modules/bar/popouts/Content.qml index 6b65f56..43f2c8e 100644 --- a/modules/bar/popouts/Content.qml +++ b/modules/bar/popouts/Content.qml @@ -27,6 +27,11 @@ Item { } Popout { + name: "network" + source: "Network.qml" + } + + Popout { name: "battery" source: "Battery.qml" } diff --git a/modules/bar/popouts/Network.qml b/modules/bar/popouts/Network.qml new file mode 100644 index 0000000..7a79ef1 --- /dev/null +++ b/modules/bar/popouts/Network.qml @@ -0,0 +1,22 @@ +import "root:/widgets" +import "root:/services" +import "root:/config" +import QtQuick + +Column { + id: root + + spacing: Appearance.spacing.normal + + StyledText { + text: qsTr("Connected to: %1").arg(Network.active?.ssid ?? "None") + } + + StyledText { + text: qsTr("Strength: %1/100").arg(Network.active?.strength ?? 0) + } + + StyledText { + text: qsTr("Frequency: %1 MHz").arg(Network.active?.frequency ?? 0) + } +} diff --git a/modules/dashboard/Performance.qml b/modules/dashboard/Performance.qml index 9334874..8513d19 100644 --- a/modules/dashboard/Performance.qml +++ b/modules/dashboard/Performance.qml @@ -18,8 +18,8 @@ Row { label1: `${Math.ceil(SystemUsage.gpuTemp)}°C` label2: `${Math.round(SystemUsage.gpuPerc * 100)}%` - sublabel1: "GPU temp" - sublabel2: "Usage" + sublabel1: qsTr("GPU temp") + sublabel2: qsTr("Usage") } Resource { @@ -31,8 +31,8 @@ Row { label1: `${Math.ceil(SystemUsage.cpuTemp)}°C` label2: `${Math.round(SystemUsage.cpuPerc * 100)}%` - sublabel1: "CPU temp" - sublabel2: "Usage" + sublabel1: qsTr("CPU temp") + sublabel2: qsTr("Usage") } Resource { @@ -48,8 +48,8 @@ Row { return `${Math.floor(fmt.value)}${fmt.unit}`; } - sublabel1: "Memory" - sublabel2: "Storage" + sublabel1: qsTr("Memory") + sublabel2: qsTr("Storage") } component Resource: Item { |