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:
@@ -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)
|
||||
|
||||
@@ -96,6 +96,10 @@ var SPEC = {
|
||||
showClock: { def: true },
|
||||
showNotificationButton: { def: true },
|
||||
showBattery: { def: true },
|
||||
showBatteryPercent: { def: true },
|
||||
showBatteryPercentOnlyOnBattery: { def: false },
|
||||
showBatteryTime: { def: false },
|
||||
showBatteryTimeOnlyOnBattery: { def: false },
|
||||
showControlCenterButton: { def: true },
|
||||
showCapsLockIndicator: { def: true },
|
||||
|
||||
|
||||
Reference in New Issue
Block a user