add support for all UPower peripherals
C++ / fmt (pull_request) Successful in 3s
JS/TS / fmt (pull_request) Successful in 17s
JS/TS / lint (pull_request) Successful in 16s
Python / fmt (pull_request) Successful in 34s
Python / lint (pull_request) Successful in 35s
Python / typecheck (pull_request) Failing after 1m5s
C++ / build (pull_request) Successful in 1m36s
Python / test (pull_request) Successful in 1m26s
Rust / fmt (pull_request) Successful in 48s
Rust / build (pull_request) Successful in 1m41s
Rust / clippy (pull_request) Successful in 1m37s
Python / buildcheck (pull_request) Successful in 2m41s
C++ / clang-tidy (pull_request) Successful in 3m32s

This commit is contained in:
2026-07-13 00:48:05 +02:00
parent 8789d2d322
commit 4ee9bb3f12
5 changed files with 86 additions and 55 deletions
+2 -2
View File
@@ -24,7 +24,7 @@ Column {
}
Repeater {
model: [...Battery.logiDevices] // ...Battery.upowerDevices]
model: Battery.allPeripherals
RowLayout {
id: layout
@@ -38,7 +38,7 @@ Column {
CustomText {
Layout.fillWidth: true
text: layout.modelData.name
text: layout.modelData.model
}
BatteryIcon {
+5 -3
View File
@@ -37,6 +37,8 @@ Item {
}
}
Component.onCompleted: Battery.startDaemon()
Loader {
id: batteryIconLoader
@@ -52,12 +54,12 @@ Item {
Loader {
id: peripheralIconLoader
active: Battery.logiDevices.some(d => d.isPresent) && !batteryIconLoader.active
active: Battery.lowestPeripheral.isPresent && !batteryIconLoader.active
anchors.centerIn: parent
sourceComponent: BatteryIcon {
devState: Battery.logiDevices[0].state
percentage: Battery.logiDevices[0].percentage
devState: Battery.lowestPeripheral.state
percentage: Battery.lowestPeripheral.percentage
}
}