Replace our NightLight solution with wlsunset.

NightLight: add temperature solution
NTextInput: add input hint support
This commit is contained in:
Ly-sec 2025-08-28 15:34:47 +02:00
parent 57a67bf4df
commit 2a686b55c4
9 changed files with 167 additions and 130 deletions

View file

@ -12,7 +12,7 @@ RowLayout {
property bool checked: false
property bool hovering: false
// Smaller default footprint than NToggle
property int baseSize: Math.max(Style.baseWidgetSize * 0.8, Math.round(14 / scaling))
property int baseSize: Math.max(Style.baseWidgetSize * 0.8, 14)
signal toggled(bool checked)
signal entered
@ -47,26 +47,14 @@ RowLayout {
anchors.fill: parent
cursorShape: Qt.PointingHandCursor
hoverEnabled: true
onEntered: {
hovering = true
root.entered()
}
onExited: {
hovering = false
root.exited()
}
onEntered: { hovering = true; root.entered() }
onExited: { hovering = false; root.exited() }
onClicked: root.toggled(!root.checked)
}
Behavior on color {
ColorAnimation {
duration: Style.animationFast
}
}
Behavior on border.color {
ColorAnimation {
duration: Style.animationFast
}
}
Behavior on color { ColorAnimation { duration: Style.animationFast } }
Behavior on border.color { ColorAnimation { duration: Style.animationFast } }
}
}