Files
bbedward ccbf1d38ad widgets: bump qml-common, rename Dank* prefixed widgets to D, add
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
2026-10-05 16:47:19 -04:00

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);
}
}
}
}
}