Add gamma slider to night light dialog

This commit is contained in:
altrup
2026-03-22 18:02:00 -04:00
parent a28ed6023e
commit fc7524a30f
2 changed files with 31 additions and 4 deletions
@@ -15,7 +15,7 @@ WindowDialog {
id: root
property var screen: root.QsWindow.window?.screen
property var brightnessMonitor: Brightness.getMonitorForScreen(screen)
backgroundHeight: 600
backgroundHeight: 700
WindowDialogTitle {
text: Translation.tr("Eye protection")
@@ -146,6 +146,33 @@ WindowDialog {
id: brightnessColumn
Layout.topMargin: -16
Layout.fillWidth: true
WindowDialogSlider {
anchors {
left: parent.left
right: parent.right
leftMargin: 4
rightMargin: 4
}
value: root.brightnessMonitor.brightness
onMoved: root.brightnessMonitor.setBrightness(value)
}
}
WindowDialogSectionHeader {
text: Translation.tr("Gamma")
}
WindowDialogSeparator {
Layout.topMargin: -22
Layout.leftMargin: 0
Layout.rightMargin: 0
}
Column {
id: gammaColumn
Layout.topMargin: -16
Layout.fillWidth: true
Layout.fillHeight: true
WindowDialogSlider {
@@ -155,9 +182,8 @@ WindowDialog {
leftMargin: 4
rightMargin: 4
}
// text: Translation.tr("Brightness")
value: root.brightnessMonitor.brightness
onMoved: root.brightnessMonitor.setBrightness(value)
value: Hyprsunset.gamma / 100
onMoved: Hyprsunset.setGamma(value * 100)
}
}