@ -85,6 +85,7 @@ Item {
property Item appletWrapper: applet &&
( ( applet . pluginName === root . plasmoidName ) ||
( applet . pluginName === "org.kde.plasma.systemtray" ) ) ? wrapper : wrapperContainer
property Item appletIconItem ; / / f i r s t a p p l e t ' s I c o n I t e m , t o b e a c t i v a t e d o n E x i t s i g n a l
property alias containsMouse: appletMouseArea . containsMouse
property alias pressed: appletMouseArea . pressed
@ -178,12 +179,42 @@ Item {
}
}
function reconsiderAppletItem ( ) {
if ( appletIconItem )
return ;
/ / ! s e a r c h i n g t o f i n d f o r t h a t a p p l e t t h e f i r s t I c o n I t e m
/ / ! w h i c h i s g o i n g t o b e u s e d i n o r d e r t o d e a c t i v a t e i t s a c t i v e
/ / ! f r o m o u r M o u s e A r e a
for ( var i = 0 ; i < applet . children . length ; ++ i ) {
for ( var j = 0 ; j < applet . children [ i ] . children . length ; ++ j ) {
if ( typeOf ( applet . children [ i ] . children [ j ] , "IconItem" ) ) {
appletIconItem = applet . children [ i ] . children [ j ] ;
return ;
} else if ( typeOf ( applet . children [ i ] . children [ j ] , "CompactRepresentation" ) ) {
for ( var k = 0 ; k < applet . children [ i ] . children [ j ] . children . length ; ++ k ) {
if ( typeOf ( applet . children [ i ] . children [ j ] . children [ k ] , "IconItem" ) ) {
appletIconItem = applet . children [ i ] . children [ j ] . children [ k ] ;
return ;
}
}
}
}
}
}
function typeOf ( obj , className ) {
var name = obj . toString ( ) ;
return ( ( name . indexOf ( className + "(" ) === 0 ) || ( name . indexOf ( className + "_QML" ) === 0 ) ) ;
}
/ / / E N D f u n c t i o n s
/ / B E G I N c o n n e c t i o n s
onAppletChanged: {
if ( ! applet ) {
destroy ( ) ;
} else {
reconsiderAppletItem ( )
}
}
@ -864,6 +895,7 @@ Item {
enabled: ( ! latteApplet ) && ( canBeHovered ) && ( ! lockZoom ) && ( ! root . editMode )
hoverEnabled: ! root . editMode && ( ! latteApplet ) && canBeHovered ? true : false
propagateComposedEvents: true
visible: enabled
property bool pressed: false
@ -883,10 +915,17 @@ Item {
layoutsContainer . currentSpot = mouseY ;
wrapper . calculateScales ( mouseY ) ;
}
reconsiderAppletItem ( ) ;
if ( appletIconItem )
appletIconItem . active = true ;
}
onExited: {
checkListHovered . start ( ) ;
if ( appletIconItem )
appletIconItem . active = false ;
}
onPositionChanged: {
@ -1010,13 +1049,6 @@ Item {
duration: units . longDuration
easing.type: Easing . OutQuad
}
/ * P r o p e r t y A n i m a t i o n {
target: wrapper
property: "zoomScale"
to: wrapper . zoomScale - ( root . zoomFactor - 1 ) / 10
duration: units . longDuration
easing.type: Easing . OutQuad
} * /
}
ParallelAnimation {
PropertyAnimation {
@ -1026,13 +1058,6 @@ Item {
duration: units . longDuration
easing.type: Easing . OutQuad
}
/ * P r o p e r t y A n i m a t i o n {
target: wrapper
property: "zoomScale"
to: root . zoomFactor
duration: units . longDuration
easing.type: Easing . OutQuad
} * /
}
}
/ / E N D a n i m a t i o n s