noctalia-shell/Modules/NightLight/NightLightOverlay.qml
LemmyCook 4cd94f0426 NightLight: refactored the code to make simpler
- using intensity instead of warmth
- animated color transition
- removed unecessary bindings and double properties
- using better icons to avoid confusion with brightness
- polished settings UI
2025-08-26 18:48:10 -04:00

46 lines
1,013 B
QML

import QtQuick
import Quickshell
import Quickshell.Wayland
import qs.Commons
import qs.Services
Variants {
model: Quickshell.screens
delegate: Loader {
required property ShellScreen modelData
readonly property real scaling: ScalingService.scale(modelData)
active: NightLightService.isActive
sourceComponent: PanelWindow {
screen: modelData
color: Color.transparent
anchors {
top: true
bottom: true
left: true
right: true
}
// Ensure a full click through
mask: Region {}
WlrLayershell.layer: WlrLayershell.Overlay
WlrLayershell.exclusionMode: ExclusionMode.Ignore
WlrLayershell.keyboardFocus: WlrKeyboardFocus.None
WlrLayershell.namespace: "noctalia-nightlight"
Rectangle {
anchors.fill: parent
color: NightLightService.overlayColor
Behavior on color {
ColorAnimation {
duration: Style.animationSlow
}
}
}
}
}
}