mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-01-29 07:52:50 -05:00
Merge branch 'master' of github.com:bbedward/DankMaterialShell
This commit is contained in:
@@ -798,10 +798,22 @@ DankPopout {
|
|||||||
width: (parent.width - Theme.spacingM) / 2
|
width: (parent.width - Theme.spacingM) / 2
|
||||||
iconName: DisplayService.nightModeEnabled ? "nightlight" : "dark_mode"
|
iconName: DisplayService.nightModeEnabled ? "nightlight" : "dark_mode"
|
||||||
text: "Night Mode"
|
text: "Night Mode"
|
||||||
secondaryText: DisplayService.nightModeEnabled ? "On" : "Off"
|
secondaryText: SessionData.nightModeAutoEnabled ? "Auto" : (DisplayService.nightModeEnabled ? "On" : "Off")
|
||||||
isActive: DisplayService.nightModeEnabled
|
isActive: DisplayService.nightModeEnabled
|
||||||
enabled: DisplayService.automationAvailable
|
enabled: DisplayService.automationAvailable
|
||||||
onClicked: DisplayService.toggleNightMode()
|
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 {
|
ToggleButton {
|
||||||
|
|||||||
@@ -666,6 +666,11 @@ Item {
|
|||||||
description: "Only adjust gamma based on time or location rules."
|
description: "Only adjust gamma based on time or location rules."
|
||||||
checked: SessionData.nightModeAutoEnabled
|
checked: SessionData.nightModeAutoEnabled
|
||||||
onToggled: (checked) => {
|
onToggled: (checked) => {
|
||||||
|
if (checked && !DisplayService.nightModeEnabled) {
|
||||||
|
DisplayService.toggleNightMode();
|
||||||
|
} else if (!checked && DisplayService.nightModeEnabled) {
|
||||||
|
DisplayService.toggleNightMode();
|
||||||
|
}
|
||||||
SessionData.setNightModeAutoEnabled(checked);
|
SessionData.setNightModeAutoEnabled(checked);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user