1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-01-28 15:32:50 -05:00

gamma: display automation state in UI

This commit is contained in:
bbedward
2025-12-09 11:26:28 -05:00
parent da4561cb35
commit f88f1ea951
7 changed files with 279 additions and 68 deletions

View File

@@ -61,14 +61,6 @@ Item {
}
}
SettingsToggleRow {
text: I18n.tr("Prevent idle for media")
description: I18n.tr("Inhibit idle timeout when audio or video is playing")
checked: SettingsData.preventIdleForMedia
visible: IdleService.idleMonitorAvailable
onToggled: checked => SettingsData.set("preventIdleForMedia", checked)
}
SettingsToggleRow {
text: I18n.tr("Fade to lock screen")
description: I18n.tr("Gradually fade the screen before locking with a configurable grace period")
@@ -76,6 +68,14 @@ Item {
onToggled: checked => SettingsData.set("fadeToLockEnabled", checked)
}
SettingsToggleRow {
text: I18n.tr("Lock before suspend")
description: I18n.tr("Automatically lock the screen when the system prepares to suspend")
checked: SettingsData.lockBeforeSuspend
visible: SessionService.loginctlAvailable && SettingsData.loginctlLockIntegration
onToggled: checked => SettingsData.set("lockBeforeSuspend", checked)
}
SettingsDropdownRow {
id: fadeGracePeriodDropdown
property var periodOptions: ["1 second", "2 seconds", "3 seconds", "4 seconds", "5 seconds", "10 seconds", "15 seconds", "20 seconds", "30 seconds"]
@@ -114,14 +114,14 @@ Item {
function onCurrentIndexChanged() {
const currentProfile = powerCategory.currentIndex === 0 ? SettingsData.acProfileName : SettingsData.batteryProfileName;
const index = powerProfileDropdown.profileValues.indexOf(currentProfile);
powerProfileDropdown.currentValue = powerProfileDropdown.profileOptions[index]
powerProfileDropdown.currentValue = powerProfileDropdown.profileOptions[index];
}
}
Component.onCompleted: {
const currentProfile = powerCategory.currentIndex === 0 ? SettingsData.acProfileName : SettingsData.batteryProfileName;
const index = profileValues.indexOf(currentProfile);
currentValue = profileOptions[index]
currentValue = profileOptions[index];
}
onValueChanged: value => {