1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2025-12-05 21:15:38 -05:00

Enchance nightMode toggle indicators

This commit is contained in:
purian23
2025-08-29 23:53:38 -04:00
parent bd39a92d16
commit e693857c39
2 changed files with 16 additions and 1 deletions

View File

@@ -792,10 +792,22 @@ DankPopout {
width: (parent.width - Theme.spacingM) / 2
iconName: DisplayService.nightModeEnabled ? "nightlight" : "dark_mode"
text: "Night Mode"
secondaryText: DisplayService.nightModeEnabled ? "On" : "Off"
secondaryText: SessionData.nightModeAutoEnabled ? "Auto" : (DisplayService.nightModeEnabled ? "On" : "Off")
isActive: DisplayService.nightModeEnabled
enabled: DisplayService.automationAvailable
onClicked: DisplayService.toggleNightMode()
DankIcon {
anchors.top: parent.top
anchors.right: parent.right
anchors.topMargin: Theme.spacingS
anchors.rightMargin: Theme.spacingS
name: "schedule"
size: 12
color: Theme.primary
visible: SessionData.nightModeAutoEnabled
opacity: 0.8
}
}
ToggleButton {

View File

@@ -667,6 +667,9 @@ Item {
checked: SessionData.nightModeAutoEnabled
onToggled: (checked) => {
SessionData.setNightModeAutoEnabled(checked);
if (checked && !DisplayService.nightModeEnabled) {
DisplayService.toggleNightMode();
}
}
Connections {