diff --git a/Modules/Notification/Notification.qml b/Modules/Notification/Notification.qml index 42a66df3f..3ecee0d13 100644 --- a/Modules/Notification/Notification.qml +++ b/Modules/Notification/Notification.qml @@ -346,7 +346,7 @@ Variants { } onPositionChanged: mouse => { if (!(mouse.buttons & Qt.LeftButton) || card.isRemoving) - return; + return; const globalPoint = cardDragArea.mapToGlobal(mouse.x, mouse.y); const rawDeltaX = globalPoint.x - card.pressGlobalX; const rawDeltaY = globalPoint.y - card.pressGlobalY; @@ -355,11 +355,11 @@ Variants { if (!card.isSwiping) { if (card.useVerticalSwipe) { if (Math.abs(deltaY) < card.swipeStartThreshold) - return; + return; card.isSwiping = true; } else { if (Math.abs(deltaX) < card.swipeStartThreshold) - return; + return; card.isSwiping = true; } } @@ -378,7 +378,7 @@ Variants { } if (mouse.button !== Qt.LeftButton) - return; + return; if (card.isSwiping) { const dismissDistance = card.useVerticalSwipe ? Math.abs(card.swipeOffsetY) : Math.abs(card.swipeOffset); @@ -395,7 +395,7 @@ Variants { } if (card.suppressClick) - return; + return; var actions = model.actionsJson ? JSON.parse(model.actionsJson) : []; var hasDefault = actions.some(function (a) { diff --git a/Modules/Panels/NotificationHistory/NotificationHistoryPanel.qml b/Modules/Panels/NotificationHistory/NotificationHistoryPanel.qml index 2771ddd53..83d663a2a 100644 --- a/Modules/Panels/NotificationHistory/NotificationHistoryPanel.qml +++ b/Modules/Panels/NotificationHistory/NotificationHistoryPanel.qml @@ -439,7 +439,7 @@ SmartPanel { cursorShape: notificationDelegate.canExpand ? Qt.PointingHandCursor : Qt.ArrowCursor onPressed: mouse => { if (mouse.button !== Qt.LeftButton) - return; + return; const globalPoint = historyInteractionArea.mapToGlobal(mouse.x, mouse.y); notificationDelegate.pressGlobalX = globalPoint.x; notificationDelegate.pressGlobalY = globalPoint.y; @@ -448,7 +448,7 @@ SmartPanel { } onPositionChanged: mouse => { if (!(mouse.buttons & Qt.LeftButton) || notificationDelegate.isRemoving) - return; + return; const globalPoint = historyInteractionArea.mapToGlobal(mouse.x, mouse.y); const deltaX = globalPoint.x - notificationDelegate.pressGlobalX; @@ -456,7 +456,7 @@ SmartPanel { if (!notificationDelegate.isSwiping) { if (Math.abs(deltaX) < notificationDelegate.swipeStartThreshold) - return; + return; // Only start a swipe-dismiss when horizontal movement is dominant. if (Math.abs(deltaX) <= Math.abs(deltaY) * 1.15) { @@ -470,7 +470,7 @@ SmartPanel { } onReleased: mouse => { if (mouse.button !== Qt.LeftButton) - return; + return; if (notificationDelegate.isSwiping) { if (Math.abs(notificationDelegate.swipeOffset) >= notificationDelegate.swipeDismissThreshold) { @@ -484,7 +484,7 @@ SmartPanel { } if (!notificationDelegate.canExpand || notificationDelegate.suppressClick) - return; + return; if (scrollView.expandedId === notificationId) { scrollView.expandedId = ""; diff --git a/Modules/Toast/Toast.qml b/Modules/Toast/Toast.qml index 9c4e12ad8..2e6f07d04 100644 --- a/Modules/Toast/Toast.qml +++ b/Modules/Toast/Toast.qml @@ -232,7 +232,7 @@ Item { } onPositionChanged: mouse => { if (!(mouse.buttons & Qt.LeftButton)) - return; + return; const globalPoint = toastDragArea.mapToGlobal(mouse.x, mouse.y); const rawDeltaX = globalPoint.x - root.pressGlobalX; const rawDeltaY = globalPoint.y - root.pressGlobalY; @@ -241,11 +241,11 @@ Item { if (!root.isSwiping) { if (root.useVerticalSwipe) { if (Math.abs(deltaY) < root.swipeStartThreshold) - return; + return; root.isSwiping = true; } else { if (Math.abs(deltaX) < root.swipeStartThreshold) - return; + return; root.isSwiping = true; } } @@ -259,7 +259,7 @@ Item { } onReleased: mouse => { if (mouse.button !== Qt.LeftButton) - return; + return; if (root.isSwiping) { root.isSwiping = false; const dismissDistance = root.useVerticalSwipe ? Math.abs(root.swipeOffsetY) : Math.abs(root.swipeOffset);