@ -33,7 +33,7 @@ import org.kde.latte 0.1 as Latte
MouseArea {
id: mainItemContainer
visible: true/ / ( i s S t a r t u p & & r o o t . d u r a t i o n T i m e ! = = 0 ) ? f a l s e : t r u e
visible: false / /true/ / ( isStartup && root . durationTime !== 0 ) ? false : tru e
anchors.bottom: ( root . position === PlasmaCore . Types . BottomPositioned ) ? parent.bottom : undefined
anchors.top: ( root . position === PlasmaCore . Types . TopPositioned ) ? parent.top : undefined
@ -47,7 +47,8 @@ MouseArea{
wrapper . height
acceptedButtons: Qt . LeftButton | Qt . MidButton | Qt . RightButton
hoverEnabled: ( inAnimation !== true ) && ( ! IsStartup ) && ( ! root . taskInAnimation ) && ( ! root . editMode || root . debugLocation )
hoverEnabled: visible && ( inAnimation !== true ) && ( ! IsStartup ) && ( ! root . taskInAnimation )
&& ( ! root . editMode || root . debugLocation ) && ( ! inBouncingAnimation )
/ / h o v e r E n a b l e d : f a l s e
property bool buffersAreReady: false
@ -59,6 +60,7 @@ MouseArea{
property bool inAddRemoveAnimation: true
property bool inAnimation: true
property bool inBlockingAnimation: false
property bool inBouncingAnimation: false
property bool inPopup: false
property bool isActive: ( IsActive === true ) ? true : false
@ -240,8 +242,25 @@ MouseArea{
id: wrapper
opacity: 0
width: ( mainItemContainer . isStartup && root . durationTime !== 0 ) ? cleanScalingWidth : showDelegateWidth
height: ( mainItemContainer . isStartup && root . durationTime !== 0 ) ? cleanScalingHeight : showDelegateheight
width: {
if ( ! mainItemContainer . visible )
return 0 ;
if ( mainItemContainer . isStartup && root . durationTime !== 0 )
return cleanScalingWidth ;
else
return showDelegateWidth ;
}
height: {
if ( ! mainItemContainer . visible )
return 0 ;
if ( mainItemContainer . isStartup && root . durationTime !== 0 )
return cleanScalingHeight ;
else
return showDelegateheight ;
}
/ / s i z e n e e d e d f o m t h e s t a t e s b e l o w i c o n s
/ / p r o p e r t y i n t s t a t e s L i n e S i z e : r o o t . s t a t e s L i n e S i z e
@ -412,7 +431,8 @@ MouseArea{
function signalUpdateScale ( nIndex , nScale , step ) {
if ( ( index === nIndex ) && ( ! mainItemContainer . inAnimation ) ) {
/ / i f ( ( i n d e x = = = n I n d e x ) & & ( ! m a i n I t e m C o n t a i n e r . i n A n i m a t i o n ) ) {
if ( ( index === nIndex ) && ( mainItemContainer . hoverEnabled ) ) {
if ( nScale >= 0 ) {
mScale = nScale + step ;
} else {
@ -909,6 +929,8 @@ MouseArea{
function launcherAction ( ) {
/ / i f ( ( l a s t B u t t o n C l i c k e d = = Q t . L e f t B u t t o n ) | | ( l a s t B u t t o n C l i c k e d = = Q t . M i d B u t t o n ) ) {
inBouncingAnimation = true ;
root . addWaitingLauncher ( mainItemContainer . launcherUrl ) ;
tasksModel . requestActivate ( modelIndex ( ) ) ;
/ / }
}
@ -1000,6 +1022,12 @@ MouseArea{
}
}
function slotWaitingLauncherRemoved ( launch ) {
if ( ( isWindow || isStartup ) && ! visible && launch === launcherUrl ) {
visible = true ;
}
}
/ / / R E M O V E
/ / f i x w r o n g p o s i t i o n i n g o f l a u n c h e r s . . . .
onActivityChanged: {
@ -1019,6 +1047,14 @@ MouseArea{
root . publishTasksGeometries . connect ( slotPublishGeometries ) ;
root . showPreviewForTasks . connect ( slotShowPreviewForTasks ) ;
if ( ( isWindow || isStartup ) && root . waitingLauncherExists ( launcherUrl ) ) {
root . waitingLauncherRemoved . connect ( slotWaitingLauncherRemoved ) ;
visible = false ;
} else {
visible = true ;
}
/ / / R E M O V E
/ / f i x w r o n g p o s i t i o n i n g o f l a u n c h e r s . . . .
/ * f o r ( v a r i = 0 ; i < t a s k s M o d e l . l a u n c h e r L i s t . l e n g t h ; + + i ) {
@ -1032,6 +1068,7 @@ MouseArea{
Component.onDestruction: {
wrapper . sendEndOfNeedBothAxisAnimation ( ) ;
root . waitingLauncherRemoved . disconnect ( slotWaitingLauncherRemoved ) ;
}
/ / / R E M O V E
@ -1317,6 +1354,18 @@ MouseArea{
}
}
/ / G h o s t a n i m a t i o n t h a t a c t s a s a d e l a y e r i n c a s e t h e r e i s a b o u n c i n g a n i m a t i o n
/ / t a k i n g p l a c e
PropertyAnimation {
target: wrapper
property: "opacity"
to: 1
duration: mainItemContainer . inBouncingAnimation ? / / e x a c t l y h o w m u c h t h e b o u n c h e a n i m a t i o n l a s t s
5 * ( root . durationTime * 0.8 * units . longDuration ) : 0
easing.type: Easing . InQuad
}
/ / e n d o f g h o s t a n i m a t i o n
PropertyAnimation {
target: wrapper
property: "mScale"
@ -1372,6 +1421,11 @@ MouseArea{
if ( mainItemContainer . launcherUrl === root . launcherForRemoval && mainItemContainer . isLauncher )
root . launcherForRemoval = "" ;
/ / s e n d s i g n a l t h a t t h e l a u n c h e r i s r e a l l y r e m o v i n g
if ( mainItemContainer . inBouncingAnimation ) {
root . removeWaitingLauncher ( mainItemContainer . launcherUrl ) ;
}
}
}