From 583b79314cb0439443f7adf3f2f6671f23f8da9e Mon Sep 17 00:00:00 2001 From: Michail Vourlakos Date: Tue, 28 May 2019 18:45:08 +0300 Subject: [PATCH] improve tooltips identifier and checkCanBeHovered --- .../package/contents/ui/applet/AppletItem.qml | 23 ++++++++++++------- 1 file changed, 15 insertions(+), 8 deletions(-) diff --git a/containment/package/contents/ui/applet/AppletItem.qml b/containment/package/contents/ui/applet/AppletItem.qml index 013c8470e..079567747 100644 --- a/containment/package/contents/ui/applet/AppletItem.qml +++ b/containment/package/contents/ui/applet/AppletItem.qml @@ -116,7 +116,10 @@ Item { ||((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 || (root.zoomFactor>1 && canBeHovered && lockZoom) + readonly property bool originalAppletBehavior: root.zoomFactor === 1 + || (root.zoomFactor>1 && !canBeHovered) + || (root.zoomFactor>1 && canBeHovered && lockZoom) + readonly property bool isSquare: communicator.overlayLatteIconIsActive property int animationTime: appliedDurationTime * (1.2 *units.shortDuration) @@ -321,12 +324,12 @@ Item { var maxSize = root.iconSize + root.thickMargins; var maxForMinimumSize = root.iconSize + root.thickMargins; - if ( (((applet && root.isHorizontal && (applet.width > maxSize || applet.Layout.minimumWidth > maxForMinimumSize)) - || (applet && root.isVertical && (applet.height > maxSize || applet.Layout.minimumHeight > maxForMinimumSize))) - && !appletItem.isSpacer - && !communicator.canShowOverlaiedLatteIcon) - || isSystray - || appletItem.needsFillSpace) { + if ( isSystray + || appletItem.needsFillSpace + || (((applet && root.isHorizontal && (applet.width > maxSize || applet.Layout.minimumWidth > maxForMinimumSize)) + || (applet && root.isVertical && (applet.height > maxSize || applet.Layout.minimumHeight > maxForMinimumSize))) + && !appletItem.isSpacer + && !communicator.canShowOverlaiedLatteIcon) ) { appletItem.canBeHovered = false; } else { appletItem.canBeHovered = true; @@ -410,6 +413,10 @@ Item { } + onIsSystrayChanged: { + checkCanBeHovered(); + } + onLatteAppletChanged: { if(appletItem.latteApplet){ root.latteApplet = appletItem.latteApplet; @@ -608,7 +615,7 @@ Item { }*/ - /* DEPRECATED in favor of VIEW::MouseSignalsTracking + /* DEPRECATED in favor of VIEW::MouseSignalsTracking MouseArea{ id: appletMouseAreaBottom anchors.fill: parent