From 927c518a6d2242c4235116670eaede277b75deb6 Mon Sep 17 00:00:00 2001 From: Michail Vourlakos Date: Thu, 16 May 2019 22:27:09 +0300 Subject: [PATCH] track applets mouse click events differently --the applets mouse click events are now tracked for View::MouseSignals tracking mechanism. This way no MouseArea is used overlaied over the applets for the mouse click events. In that way the applets are using their own built-in functionality for mouse click events and at the same time for Latte is tracking only the neutral areas for this meaning the applets external margins in order to obey Fitt's Law BUG: 406215 --- .../package/contents/ui/applet/AppletItem.qml | 42 +++++++++---------- 1 file changed, 21 insertions(+), 21 deletions(-) diff --git a/containment/package/contents/ui/applet/AppletItem.qml b/containment/package/contents/ui/applet/AppletItem.qml index 9b147bff7..091cbccad 100644 --- a/containment/package/contents/ui/applet/AppletItem.qml +++ b/containment/package/contents/ui/applet/AppletItem.qml @@ -115,6 +115,7 @@ Item { ||((index === layoutsContainer.mainLayout.beginIndex+layoutsContainer.mainLayout.count-2)&&(layoutsContainer.mainLayout.count>2)) ||((index === layoutsContainer.endLayout.beginIndex+layoutsContainer.endLayout.count-1)&&(layoutsContainer.endLayout.count>1))) + readonly property bool acceptMouseEvents: applet && !isLattePlasmoid && !originalAppletBehavior && !appletItem.isSeparator && !communicator.parabolicEffectLocked readonly property bool originalAppletBehavior: ((root.zoomFactor === 1 || !canBeHovered) && !root.titleTooltips) || lockZoom readonly property bool isSquare: communicator.overlayLatteIconIsActive @@ -153,7 +154,7 @@ Item { property Item communicatorAlias: communicator property Item wrapperAlias: wrapper - property bool containsMouse: appletMouseArea.containsMouse || appletMouseAreaBottom.containsMouse + property bool containsMouse: appletMouseArea.containsMouse /*|| appletMouseAreaBottom.containsMouse*/ property bool pressed: viewSignalsConnector.pressed || clickedAnimation.running /*onComputeHeightChanged: { @@ -173,8 +174,18 @@ Item { //unfortunately for other applets there is no other way to activate them yet //for example the icon-only applets var choords = mapToItem(appletItem.appletWrapper, mouse.x, mouse.y); - if (choords.x<0 || choords.y<0 || choords.x>=appletItem.appletWrapper.width || choords.y>=appletItem.appletWrapper.height) { + + var wrapperContainsMouse = choords.x>=0 && choords.y>=0 && choords.x=0 && mouse.y>=0 && mouse.x