Add NightLight, update README, format
This commit is contained in:
parent
71cfbc8c0a
commit
634d78456d
11 changed files with 471 additions and 22 deletions
|
|
@ -194,17 +194,13 @@ Loader {
|
|||
property int calculatedY: {
|
||||
if (panelAnchorVerticalCenter) {
|
||||
return (panelWindow.height - panelHeight) / 2
|
||||
}
|
||||
else if (panelAnchorBottom) {
|
||||
} else if (panelAnchorBottom) {
|
||||
return panelWindow.height - panelHeight - (Style.marginS * scaling)
|
||||
}
|
||||
else if (panelAnchorTop) {
|
||||
} else if (panelAnchorTop) {
|
||||
return (Style.marginS * scaling)
|
||||
}
|
||||
else if (panelAnchorBottom) {
|
||||
} else if (panelAnchorBottom) {
|
||||
panelWindow.height - panelHeight - (Style.marginS * scaling)
|
||||
}
|
||||
else if (!barAtBottom) {
|
||||
} else if (!barAtBottom) {
|
||||
// Below the top bar
|
||||
return Style.marginS * scaling
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue