Files
DankMaterialShell/quickshell/Modules/ControlCenter/Widgets/NightModeTile.qml
T
bbedward 014c69b09a settings: tile color restyle and re-org, use materials own shift for
them towards theme
controlCenter: make a real grid, add numerous more tile varieties, add
icon size option
surfaces: fix elevation levels in general, and shift them down
settings: restyles and re-org
sliders: scale down universally
2026-09-18 14:32:55 -04:00

44 lines
1.3 KiB
QML

import QtQuick
import qs.Common
import qs.Services
import qs.Widgets
CcTile {
id: root
iconName: NightModeService.nightModeEnabled ? "nightlight" : "dark_mode"
title: I18n.tr("Night mode")
active: NightModeService.nightModeEnabled || false
enabled: NightModeService.automationAvailable
onClicked: NightModeService.toggleNightMode()
expandedContent: Component {
Column {
spacing: Theme.spacingS
StyledText {
width: parent.width
text: I18n.tr("Color Temperature", "Color Temperature")
color: root.contentColor
font.pixelSize: Theme.fontSizeMedium
elide: Text.ElideRight
}
DankSlider {
width: parent.width
minimum: 1000
maximum: 6000
step: 100
unit: "K"
Accessible.name: I18n.tr("Color Temperature", "Color Temperature")
value: SessionData.nightModeTemperature
onSliderValueChanged: newValue => {
SessionData.setNightModeTemperature(newValue);
if (SessionData.nightModeHighTemperature < newValue)
SessionData.setNightModeHighTemperature(newValue);
}
}
}
}
}