1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-06-22 11:05:22 -04:00

feat(battery): add options to toggle percentage and remaining time (#2672)

* feat(battery): add options to toggle percentage and remaining time

* fix(battery): add SettingsSpec entries and combine verticalDisplayText

* fix(battery): format vertical battery remaining time as HH\nMM and center alignment

* fix(battery): remove percent sign from vertical layout when time is enabled
This commit is contained in:
Huỳnh Thiện Lộc
2026-06-22 09:12:48 +07:00
committed by GitHub
parent 4cbe766cbd
commit a043d477fb
6 changed files with 389 additions and 6 deletions
+12
View File
@@ -28,6 +28,10 @@ Singleton {
showMicIcon: false,
showMicPercent: true,
showBatteryIcon: false,
showBatteryPercent: true,
showBatteryPercentOnlyOnBattery: false,
showBatteryTime: false,
showBatteryTimeOnlyOnBattery: false,
showPrinterIcon: false,
showScreenSharingIcon: true
};
@@ -83,6 +87,14 @@ Singleton {
item.showMicPercent = order[i].showMicPercent;
if (isObj && order[i].showBatteryIcon !== undefined)
item.showBatteryIcon = order[i].showBatteryIcon;
if (isObj && order[i].showBatteryPercent !== undefined)
item.showBatteryPercent = order[i].showBatteryPercent;
if (isObj && order[i].showBatteryPercentOnlyOnBattery !== undefined)
item.showBatteryPercentOnlyOnBattery = order[i].showBatteryPercentOnlyOnBattery;
if (isObj && order[i].showBatteryTime !== undefined)
item.showBatteryTime = order[i].showBatteryTime;
if (isObj && order[i].showBatteryTimeOnlyOnBattery !== undefined)
item.showBatteryTimeOnlyOnBattery = order[i].showBatteryTimeOnlyOnBattery;
if (isObj && order[i].showPrinterIcon !== undefined)
item.showPrinterIcon = order[i].showPrinterIcon;
if (isObj && order[i].showScreenSharingIcon !== undefined)