1
0
mirror of https://github.com/KDE/latte-dock.git synced 2024-12-25 19:21:41 +03:00

restore properly multi-tasks parabolic effect

--update parabolic effect clear zoom functionanlity in order
to clear zoom properly
This commit is contained in:
Michail Vourlakos 2020-05-03 21:19:10 +03:00
parent 9145634434
commit 7b521634a8
3 changed files with 17 additions and 12 deletions

View File

@ -227,7 +227,7 @@ Item {
property Item appletsRecords: null
property Item metrics: null
property bool containsMouse: appletMouseArea.containsMouse /*|| appletMouseAreaBottom.containsMouse*/
property bool containsMouse: appletMouseArea.containsMouse || (isLattePlasmoid && latteApplet.containsMouse)
property bool pressed: viewSignalsConnector.pressed || clickedAnimation.running
@ -396,6 +396,12 @@ Item {
canBeHoveredTimer.start();
}
function sltInitializeHoveredIndexes() {
if (latteApplet) {
latteApplet.initializeHoveredIndex();
}
}
//! Reduce calculations and give the time to applet to adjust to prevent binding loops
Timer{
id: canBeHoveredTimer
@ -405,6 +411,11 @@ Item {
return;
}
if (appletItem.isLattePlasmoid) {
appletItem.canBeHovered = true;
return;
}
var maxSize = appletItem.metrics.iconSize + metrics.totals.thicknessEdges;
var maxForMinimumSize = appletItem.metrics.iconSize + metrics.totals.thicknessEdges;
@ -515,6 +526,7 @@ Item {
root.updateIndexes.connect(checkIndex);
root.clearZoomSignal.connect(clearZoom);
root.destroyInternalViewSplitters.connect(slotDestroyInternalViewSplitters);
root.sglInitializeHoveredIndexes.connect(sltInitializeHoveredIndexes);
}
Component.onDestruction: {
@ -538,6 +550,7 @@ Item {
root.updateIndexes.disconnect(checkIndex);
root.clearZoomSignal.disconnect(clearZoom);
root.destroyInternalViewSplitters.disconnect(slotDestroyInternalViewSplitters);
root.sglInitializeHoveredIndexes.disconnect(sltInitializeHoveredIndexes);
if (appletItem.latteApplet) {
appletItem.latteApplet.signalPreviewsShown.disconnect(slotPreviewsShown);

View File

@ -53,6 +53,7 @@ Item {
signal clearZoomSignal();
signal destroyInternalViewSplitters();
signal emptyAreasWheel(QtObject wheel);
signal sglInitializeHoveredIndexes();
signal separatorsUpdated();
signal signalActivateEntryAtIndex(int entryIndex);
signal signalNewInstanceForEntryAtIndex(int entryIndex);
@ -936,10 +937,6 @@ Item {
}
function clearZoom(){
if (latteApplet){
latteApplet.clearZoom();
}
root.clearZoomSignal();
}
@ -992,9 +989,8 @@ Item {
function initializeHoveredIndexes() {
layoutsContainer.hoveredIndex = -1;
layoutsContainer.currentSpot = -1000;
if (latteApplet) {
latteApplet.initializeHoveredIndex();
}
root.sglInitializeHoveredIndexes();
}
function layoutManager() {
@ -1018,9 +1014,6 @@ Item {
}
function mouseInCanBeHoveredApplet(){
if (latteApplet && latteApplet.containsMouse())
return true;
var applets = layoutsContainer.startLayout.children;
for(var i=0; i<applets.length; ++i){

View File

@ -1963,7 +1963,6 @@ Item {
function startCheckRestoreZoomTimer(duration) {
if (latteView) {
latteView.startCheckRestoreZoomTimer();
} else {
if (duration > 0) {