only show bat module when the device is a laptop

This commit is contained in:
lucy 2026-05-23 14:17:17 +02:00
commit 960d7c4598
3 changed files with 18 additions and 17 deletions

View file

@ -10,6 +10,7 @@ Rectangle {
id: root
clip: true
color: Colors.base01
visible: UPower.displayDevice.isLaptopBattery
property double percent: UPower.displayDevice.percentage * 100
property bool hasBattery: UPower.displayDevice.isLaptopBattery
property bool charging: UPower.displayDevice.state == UPowerDeviceState.Charging