mirror of
https://github.com/AvengeMedia/DankMaterialShell.git
synced 2026-10-16 00:04:01 -04:00
deprecation notice to plugin compatibility shims - When qml-common became a thing, we left qs.Widgets shims in place for plugin compatibility - It's annoying to need to maintain them when qml-common has any change, add a warning so we can safely deprecate them in the future - One shot rename the common stuff to D to make it shorter and nicer to write
44 lines
1.3 KiB
QML
44 lines
1.3 KiB
QML
import QtQuick
|
|
import qs.Common
|
|
import qs.Services
|
|
import qs.DCommon.Widgets
|
|
|
|
CcTile {
|
|
id: root
|
|
|
|
iconName: NightModeService.nightModeEnabled ? "nightlight" : "dark_mode"
|
|
title: I18n.tr("Night mode")
|
|
active: NightModeService.nightModeEnabled || false
|
|
available: 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
|
|
}
|
|
|
|
DSlider {
|
|
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);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|