@ -18,7 +18,7 @@
* along with this program . If not , see < http: / / w w w . g n u . o r g / l i c e n s e s / > .
* /
import QtQuick 2. 1
import QtQuick 2. 7
import QtQuick . Layouts 1.1
import QtGraphicalEffects 1.0
@ -41,7 +41,8 @@ Item {
width: isInternalViewSplitter && ! root . inConfigureAppletsMode ? 0 : computeWidth
height: isInternalViewSplitter && ! root . inConfigureAppletsMode ? 0 : computeHeight
signal mousePressed ( int x , int y ) ;
signal mousePressed ( int x , int y , int button ) ;
signal mouseReleased ( int x , int y , int button ) ;
property bool animationsEnabled: true
property bool animationWasSent: false / / p r o t e c t i o n f l a g f o r a n i m a t i o n b r o a d c a s t i n g
@ -134,8 +135,8 @@ Item {
property Item communicatorAlias: communicator
property Item wrapperAlias: wrapper
property alias containsMouse: appletMouseArea . containsMouse
property alias pressed: appletMouseArea . pressed
property bool containsMouse: appletMouseArea . containsMouse || appletMouseAreaBottom . containsMouse
property bool pressed: viewSignalsConnector . pressed || clickedAnimation . running
/ * o n C o m p u t e H e i g h t C h a n g e d : {
if ( index == 0 )
@ -448,6 +449,30 @@ Item {
}
}
Connections {
id: viewSignalsConnector
target: root . latteView ? root.latteView : null
enabled: ! appletItem . isLattePlasmoid && ! appletItem . isSeparator && ! appletItem . isSpacer && ! appletItem . isHidden
property bool pressed: false
onMousePressed: {
if ( appletItem . containsPos ( Qt . point ( x , y ) ) ) {
viewSignalsConnector . pressed = true ;
var local = appletItem . mapFromItem ( root , x , y ) ;
appletItem . mousePressed ( local . x , local . y , button ) ;
}
}
onMouseReleased: {
if ( appletItem . containsPos ( Qt . point ( x , y ) ) ) {
viewSignalsConnector . pressed = false ;
var local = appletItem . mapFromItem ( root , x , y ) ;
appletItem . mouseReleased ( local . x , local . y , button ) ;
}
}
}
/ / / E N D c o n n e c t i o n s
/ / ! I t i s u s e d f o r a n y c o m m u n i c a t i o n n e e d e d w i t h t h e u n d e r l y i n g a p p l e t
@ -494,16 +519,12 @@ Item {
propagateComposedEvents: true
visible: ( ! appletMouseArea . visible || ! appletMouseArea . enabled ) && ! root . editMode && ! originalAppletBehavior
property bool pressed: false
onPressed: {
appletItem . activateAppletForNeutralAreas ( mouse ) ;
pressed = true ;
mouse . accepted = false ;
}
onReleased: {
pressed = false ;
mouse . accepted = false ;
}
}
@ -665,10 +686,8 @@ Item {
visible: applet && ! isLattePlasmoid && ! originalAppletBehavior && ! appletItem . isSeparator && ! communicator . parabolicEffectLocked
property bool blockWheel: false
property bool pressed: false
onClicked: {
pressed = false ;
mouse . accepted = false ;
}
@ -728,7 +747,6 @@ Item {
}
onPositionChanged: {
/ / i f ( ! p r e s s e d ) {
if ( originalAppletBehavior || ! canBeHovered ) {
mouse . accepted = false ;
return ;
@ -774,17 +792,14 @@ Item {
}
onPressed: {
appletItem . mousePressed ( mouse . x , mouse . y ) ;
appletItem . activateAppletForNeutralAreas ( mouse ) ;
pressed = true ;
/ / ! t h i s i s n e e d e d f o r s o m e a p p l e t s i s o r d e r t o b e a c t i v a t e d / d e a c t i v a t e d c o r r e c t l y
/ / ! s u c h c a s e i s t h e " A p p l i c a t i o n M e n u " . ( b u g # 9 2 8 )
mouse . accepted = false ;
}
onReleased: {
pressed = false ;
mouse . accepted = false ;
}
@ -902,12 +917,7 @@ Item {
SequentialAnimation {
id: clickedAnimation
alwaysRunToEnd: true
running: ( appletMouseArea . pressed || appletMouseAreaBottom . pressed ) && ( root . durationTime > 0 ) && ! indicators . info . providesClickedAnimation
onStopped: {
appletMouseArea . pressed = false ;
appletMouseAreaBottom . pressed = false ;
}
running: ( appletItem . pressed ) && ( root . durationTime > 0 ) && ! indicators . info . providesClickedAnimation
ParallelAnimation {
PropertyAnimation {