Icons: Brightness and battery

This commit is contained in:
LemmyCook 2025-09-08 15:53:50 -04:00
parent 404a1d3e8b
commit ea6b8e0c02
18 changed files with 36 additions and 66 deletions

View file

@ -39,7 +39,7 @@ Item {
// Test mode
readonly property bool testMode: false
readonly property int testPercent: 50
readonly property bool testCharging: true
readonly property bool testCharging: false
// Main properties
readonly property var battery: UPower.displayDevice
@ -87,8 +87,7 @@ Item {
rightOpen: BarWidgetRegistry.getNPillDirection(root)
icon: testMode ? BatteryService.getIcon(testPercent, testCharging, true) : BatteryService.getIcon(percent,
charging, isReady)
iconRotation: -90
text: ((isReady && battery.isLaptopBattery) || testMode) ? Math.round(percent) + "%" : "-"
text: (isReady || testMode) ? Math.round(percent) + "%" : "-"
textColor: charging ? Color.mPrimary : Color.mOnSurface
iconCircleColor: Color.mPrimary
collapsedIconColor: Color.mOnSurface