mirror of
https://invent.kde.org/marcoa/shift-shell.git
synced 2026-04-26 14:23:09 +00:00
explicitly declare signal handlers params
This commit is contained in:
parent
6359e59f48
commit
8b5ec57d0b
6 changed files with 20 additions and 8 deletions
|
|
@ -38,7 +38,7 @@ QQC2.AbstractButton {
|
|||
id: mouseArea
|
||||
anchors.fill: parent
|
||||
acceptedButtons: Qt.LeftButton | Qt.RightButton
|
||||
onPressed: {
|
||||
onPressed: mouse => {
|
||||
if (mouse.button === Qt.RightButton) {
|
||||
root.rightClickPressed();
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -35,12 +35,12 @@ Item {
|
|||
|
||||
enabled: !taskSwitcher.visible
|
||||
|
||||
onPressed: {
|
||||
onPressed: mouse => {
|
||||
startMouseX = oldMouseX = mouse.x;
|
||||
startMouseY = oldMouseY = mouse.y;
|
||||
}
|
||||
|
||||
onPositionChanged: {
|
||||
onPositionChanged: mouse => {
|
||||
if (root.taskSwitcher.visible || taskSwitcher.taskSwitcherState.currentlyBeingOpened) {
|
||||
// update task switcher drag
|
||||
let offsetY = (mouse.y - oldMouseY) * 0.5; // we want to make the gesture take a longer swipe than it being pixel perfect
|
||||
|
|
|
|||
|
|
@ -65,7 +65,7 @@ Item {
|
|||
id: haptics
|
||||
}
|
||||
|
||||
onPressed: {
|
||||
onPressed: mouse => {
|
||||
startMouseX = oldMouseX = mouse.y;
|
||||
startMouseY = oldMouseY = mouse.y;
|
||||
activeButton = icons.childAt(mouse.x, mouse.y);
|
||||
|
|
@ -74,7 +74,7 @@ Item {
|
|||
}
|
||||
}
|
||||
|
||||
onPositionChanged: {
|
||||
onPositionChanged: mouse => {
|
||||
let newButton = icons.childAt(mouse.x, mouse.y);
|
||||
if (newButton != activeButton) {
|
||||
activeButton = null;
|
||||
|
|
|
|||
|
|
@ -178,7 +178,13 @@ Item {
|
|||
}
|
||||
|
||||
// launch app handled by press animation
|
||||
onClicked: (mouse.button === Qt.RightButton) ? openContextMenu() : launchAppRequested = true;
|
||||
onClicked: mouse => {
|
||||
if (mouse.button === Qt.RightButton) {
|
||||
openContextMenu();
|
||||
} else {
|
||||
launchAppRequested = true;
|
||||
}
|
||||
}
|
||||
|
||||
HoverHandler {
|
||||
id: hoverHandler
|
||||
|
|
|
|||
|
|
@ -115,7 +115,13 @@ MouseArea {
|
|||
}
|
||||
}
|
||||
// launch app handled by press animation
|
||||
onClicked: (mouse.button === Qt.RightButton) ? openContextMenu() : launchAppRequested = true
|
||||
onClicked: mouse => {
|
||||
if (mouse.button === Qt.RightButton) {
|
||||
openContextMenu();
|
||||
} else {
|
||||
launchAppRequested = true;
|
||||
}
|
||||
}
|
||||
|
||||
ColumnLayout {
|
||||
anchors {
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@ MouseArea {
|
|||
|
||||
focus: true
|
||||
|
||||
onPressed: mouse.accepted = mouse.source !== Qt.MouseEventNotSynthesized
|
||||
onPressed: mouse => { mouse.accepted = mouse.source !== Qt.MouseEventNotSynthesized; }
|
||||
onVerticalScrollBarPolicyChanged: {
|
||||
scrollBarCreationTimer.restart();
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue