Add NightLight, update README, format

This commit is contained in:
Ly-sec 2025-08-26 18:19:35 +02:00
parent 71cfbc8c0a
commit 634d78456d
11 changed files with 471 additions and 22 deletions

View file

@ -27,6 +27,7 @@ Item {
signal entered
signal exited
signal clicked
signal rightClicked
signal wheel(int delta)
// Internal state
@ -194,6 +195,7 @@ Item {
MouseArea {
anchors.fill: parent
hoverEnabled: true
acceptedButtons: Qt.LeftButton | Qt.RightButton
onEntered: {
root.entered()
tooltip.show()
@ -211,8 +213,12 @@ Item {
}
tooltip.hide()
}
onClicked: {
root.clicked()
onClicked: function (mouse) {
if (mouse.button === Qt.LeftButton) {
root.clicked()
} else if (mouse.button === Qt.RightButton) {
root.rightClicked()
}
}
onWheel: wheel => {
root.wheel(wheel.angleDelta.y)