@ -154,7 +154,6 @@ Item {
readonly property bool screenEdgeMarginSupported: communicator . requires . screenEdgeMarginSupported
property int animationTime: appletItem . animations . speedFactor . normal * ( 1.2 * appletItem . animations . duration . small )
property int hoveredIndex: layoutsContainer . hoveredIndex
property int index: - 1
property int maxWidth: root . isHorizontal ? root.height : root . width
property int maxHeight: root . isHorizontal ? root.height : root . width
@ -383,9 +382,7 @@ Item {
/ / o u t s i d e t h e L a t t e A p p l e t P l a s m o i d
/ / p r o p e r t y i n t d e b C o u n t e r : 0 ;
function clearZoom ( ) {
if ( layoutsContainer . hoveredIndex === - 1 && root . latteAppletHoveredIndex === - 1 ) {
restoreAnimation . start ( ) ;
}
restoreAnimation . start ( ) ;
if ( latteApplet ) {
latteApplet . clearZoom ( ) ;
@ -396,12 +393,6 @@ Item {
canBeHoveredTimer . start ( ) ;
}
function sltInitializeHoveredIndexes ( ) {
if ( latteApplet ) {
latteApplet . initializeHoveredIndex ( ) ;
}
}
/ / ! R e d u c e c a l c u l a t i o n s a n d g i v e t h e t i m e t o a p p l e t t o a d j u s t t o p r e v e n t b i n d i n g l o o p s
Timer {
id: canBeHoveredTimer
@ -526,7 +517,6 @@ Item {
root . updateIndexes . connect ( checkIndex ) ;
root . clearZoomSignal . connect ( clearZoom ) ;
root . destroyInternalViewSplitters . connect ( slotDestroyInternalViewSplitters ) ;
root . sglInitializeHoveredIndexes . connect ( sltInitializeHoveredIndexes ) ;
}
Component.onDestruction: {
@ -550,7 +540,6 @@ 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 ) ;
@ -561,38 +550,6 @@ Item {
Connections {
target: root
/ * o n G l o b a l D i r e c t R e n d e r C h a n g e d : {
if ( root . globalDirectRender && restoreAnimation . running ) {
/ / c o n s o l e . l o g ( " C L E A R A P P L E T S C A L E ! ! ! ! " ) ;
/ / r e s t o r e A n i m a t i o n . s t o p ( ) ;
/ / w r a p p e r . z o o m S c a l e = 1 ;
}
} * /
onLatteAppletHoveredIndexChanged: {
if ( ( root . zoomFactor > 1 ) && ( root . latteAppletHoveredIndex >= 0 ) ) {
var distance = 2 ;
/ / f o r T a s k s p l a s m o i d d i s t a n c e o f 2 i s n o t a l w a y s s a f e t h e r e a r e
/ / c a s e s t h a t n e e d s t o b e 3 , w h e n a n i n t e r n a l s e p a r a t o r t h e r e i s
/ / b e t w e e n t h e h o v e r e d t a s k a n d t h e c u r r e n t a p p l e t
if ( root . hasInternalSeparator ) {
if ( index < root . latteAppletPos ) {
var firstTaskIndex = root . latteApplet . parabolicManager . availableHigherIndex ( 0 ) ;
distance = firstTaskIndex + 2 ;
} else if ( index > root . latteAppletPos ) {
var lastTaskIndex = root . latteApplet . parabolicManager . availableLowerIndex ( root . tasksCount - 1 ) ;
distance = root . tasksCount - 1 - lastTaskIndex + 2 ;
}
}
if ( Math . abs ( index - root . latteAppletPos + root . latteAppletHoveredIndex ) >= Math . max ( 2 , distance ) ) {
appletItem . clearZoom ( ) ;
}
}
}
onSignalActivateEntryAtIndex: {
if ( parabolicManager . pseudoIndexBelongsToLatteApplet ( entryIndex ) && appletItem . isLattePlasmoid ) {
latteApplet . activateTaskAtIndex ( entryIndex - latteApplet . tasksBaseIndex ) ;
@ -610,30 +567,6 @@ Item {
}
}
Connections {
target: layoutsContainer
onHoveredIndexChanged: {
/ / f o r a p p l e t s i t i s s a f e t o c o n s i d e r t h a t a d i s t a n c e o f 2
/ / i s e n o u g h t o c l e a r Z o o m
if ( ( root . zoomFactor > 1 ) && ( layoutsContainer . hoveredIndex >= 0 )
&& ( Math . abs ( index - layoutsContainer . hoveredIndex ) >= 2 ) )
appletItem . clearZoom ( ) ;
if ( ( restoreAnimation . running ) && ( layoutsContainer . hoveredIndex !== - 1 ) ) {
restoreAnimation . stop ( ) ;
}
}
}
Connections {
target: root
onLatteAppletHoveredIndexChanged: {
if ( ( restoreAnimation . running ) && ( root . latteAppletHoveredIndex !== - 1 ) ) {
restoreAnimation . stop ( ) ;
}
}
}
Connections {
id: viewSignalsConnector
target: root . latteView ? root.latteView : null
@ -1008,10 +941,8 @@ Item {
property bool blockWheel: false
onEntered: {
if ( containsMouse && ! originalAppletBehavior && ! communicator . requires . parabolicEffectLocked && appletItem . canBeHovered ) {
root . stopCheckRestoreZoomTimer ( ) ;
}
onEntered: {
root . stopCheckRestoreZoomTimer ( ) ;
if ( restoreAnimation . running ) {
restoreAnimation . stop ( ) ;
@ -1021,17 +952,10 @@ Item {
root . showTooltipLabel ( appletItem , applet . title ) ;
}
/ / c o n s o l e . l o g ( " e n t e r e d a p p l e t : " + l a y o u t s C o n t a i n e r . h o v e r e d I n d e x ) ;
if ( layoutsContainer . hoveredIndex === - 1 && root . latteAppletHoveredIndex === - 1 ) {
if ( ! root . directRenderDelayerIsRunning ) {
root . startDirectRenderDelayerDuringEntering ( ) ;
}
if ( ! ( root . latteViewIsHidden || root . inSlidingIn || root . inSlidingOut ) ) {
layoutsContainer . hoveredIndex = index ;
}
if ( originalAppletBehavior || communicator . requires . parabolicEffectLocked || ! canBeHovered ) {
return ;
}
@ -1074,16 +998,10 @@ Item {
return ;
}
if ( layoutsContainer . hoveredIndex === - 1 && root . latteAppletHoveredIndex === - 1 ) {
root . startDirectRenderDelayerDuringEntering ( ) ;
}
if ( ! ( root . latteViewIsHidden || root . inSlidingIn || root . inSlidingOut ) ) {
layoutsContainer . hoveredIndex = index ;
}
if ( ! root . globalDirectRender && ! root . directRenderDelayerIsRunning ) {
if ( parabolicManager . lastIndex >= 0 && parabolicManager . lastIndex != index ) {
root . setGlobalDirectRender ( true ) ;
} else if ( ! root . directRenderDelayerIsRunning ) {
root . startDirectRenderDelayerDuringEntering ( ) ;
}
if ( ( ( wrapper . zoomScale == 1 || wrapper . zoomScale === root . zoomFactor ) && ! root . globalDirectRender ) || root . globalDirectRender ) {