@ -45,13 +45,14 @@ DragDrop.DropArea {
/ / / / B E G I N p r o p e r t i e s
property bool debugMode: Qt . application . arguments . indexOf ( "--graphics" ) >= 0
property bool globalDirectRender: false / / i t i s u s e d to c h e c k b o t h t h e a p p l e t a n d t h e c o n t a i n m e n t f o r d i r e c t r e n d e r
property bool globalDirectRender: false / / i t i s u s e d as a g l o b a l D i r e c t R e n d e r f o r a l l e l e m e n t s i n t h e d o c k
property bool addLaunchersMessage: false
property bool addLaunchersInTaskManager: plasmoid . configuration . addLaunchersInTaskManager
property bool autoDecreaseIconSize: plasmoid . configuration . autoDecreaseIconSize
property bool blurEnabled: plasmoid . configuration . blurEnabled
property bool confirmedDragEntered: false
property bool dockContainsMouse: dock && dock . visibility ? dock.visibility.containsMouse : false
property bool drawShadowsExternal: visibilityManager . panelIsBiggerFromIconSize && ( zoomFactor === 1.0 )
&& ( dock . visibility . mode === Latte . Dock . AlwaysVisible || dock . visibility . mode === Latte . Dock . WindowsGoBelow )
&& ( plasmoid . configuration . panelPosition === Latte . Dock . Justify ) && ! root . solidPanel
@ -196,8 +197,6 @@ DragDrop.DropArea {
/ / T O B E D E L E T E D , i f n o t n e e d e d : p r o p e r t y i n t c o u n t e r : 0 ;
/ / / B E G I N p r o p e r t i e s p r o v i d e d t o L a t t e P l a s m o i d
property bool directRender: layoutsContainer . directRender
property bool enableShadows: plasmoid . configuration . shadows
property bool dockIsHidden: dock ? dock.visibility.isHidden : true
property bool dotsOnActive: plasmoid . configuration . dotsOnActive
@ -481,20 +480,6 @@ DragDrop.DropArea {
/ / / / E N D O F B e h a v i o r s
/ / / / / / / / / / / / / / S T A R T O F C O N N E C T I O N S
Connections {
target: latteApplet
onDirectRenderChanged: {
root . globalDirectRender = latteApplet . directRender || layoutsContainer . directRender ;
}
}
Connections {
target: layoutsContainer
onDirectRenderChanged: {
root . globalDirectRender = latteApplet ? latteApplet . directRender || layoutsContainer.directRender : layoutsContainer . directRender ;
}
}
onEditModeChanged: {
if ( editMode ) {
visibilityManager . updateMaskArea ( ) ;
@ -941,35 +926,18 @@ DragDrop.DropArea {
}
function clearZoom ( ) {
if ( enableDirectRenderTimer . running )
enableDirectRenderTimer . stop ( ) ;
layoutsContainer . directRender = false ;
layoutsContainer . currentSpot = - 1000 ;
layoutsContainer . hoveredIndex = - 1 ;
root . clearZoomSignal ( ) ;
}
function containmentActions ( ) {
return dock . containmentActions ( ) ;
}
function containsMouse ( ) {
var result = root . outsideContainsMouse ( ) ;
if ( result )
return true ;
if ( ! result && latteApplet && latteApplet . outsideContainsMouse ( ) ) {
layoutsContainer . hoveredIndex = latteAppletContainer . index ;
return true ;
}
if ( latteApplet ) {
latteApplet . clearZoom ( ) ;
}
return false ;
root . clearZoomSignal ( ) ;
}
function containmentActions ( ) {
return dock . containmentActions ( ) ;
}
function internalViewSplittersCount ( ) {
@ -998,41 +966,6 @@ DragDrop.DropArea {
return splitters ;
}
function outsideContainsMouse ( ) {
var applets = startLayout . children ;
for ( var i = 0 ; i < applets . length ; ++ i ) {
var applet = applets [ i ] ;
if ( applet && applet . containsMouse && ! applet . lockZoom && applet . canBeHovered ) {
return true ;
}
}
applets = mainLayout . children ;
for ( var i = 0 ; i < applets . length ; ++ i ) {
var applet = applets [ i ] ;
if ( applet && applet . containsMouse && ! applet . lockZoom && applet . canBeHovered ) {
return true ;
}
}
/ / / c h e c k s e c o n d l a y o u t a l s o
applets = endLayout . children ;
for ( var i = 0 ; i < applets . length ; ++ i ) {
var applet = applets [ i ] ;
if ( applet && applet . containsMouse && ! applet . lockZoom && applet . canBeHovered ) {
return true ;
}
}
return false ;
}
function removeInternalViewSplitters ( ) {
for ( var container in mainLayout . children ) {
var item = mainLayout . children [ container ] ;
@ -1269,6 +1202,17 @@ DragDrop.DropArea {
}
}
Connections {
target: dock . visibility
onContainsMouseChanged: {
if ( dock . visibility . containsMouse ) {
if ( checkRestoreZoom . running )
checkRestoreZoom . stop ( ) ;
} else {
checkRestoreZoom . start ( ) ;
}
}
}
/ / / / E N D i n t e r f a c e s
@ -1281,6 +1225,18 @@ DragDrop.DropArea {
/ / / / / / / / / / / / / / / B E G I N U I e l e m e n t s
/ / i t i s u s e d t o c h e c k i f t h e m o u s e i s o u t s i d e t h e l a y o u t s C o n t a i n e r b o r d e r s ,
/ / s o i n t h a t c a s e t h e o n L e a v e e v e n t b e h a v i o r s h o u l d b e t r i g e r r e d
MouseArea {
id: rootMouseArea
anchors.fill: parent
hoverEnabled: true
onEntered: {
if ( ! root . editMode )
checkRestoreZoom . start ( ) ;
}
}
Loader {
active: Qt . application . arguments . indexOf ( "--with-window" ) >= 0
sourceComponent: DebugWindow { }
@ -1370,8 +1326,6 @@ DragDrop.DropArea {
property int currentSpot: - 1000
property int hoveredIndex: - 1
property bool directRender: false
x: {
if ( dock && ( plasmoid . configuration . panelPosition === Latte . Dock . Justify ) && root . isHorizontal
&& ! root . editMode && ! root . drawShadowsExternal ) {
@ -1792,19 +1746,37 @@ DragDrop.DropArea {
/ / / / / / / / / / / / / / / B E G I N T I M E R e l e m e n t s
/ / T i m e r t o c h e c k i f t h e m o u s e i s s t i l l i n s i d e t h e L i s t V i e w
/ / T i m e r t o c h e c k i f t h e m o u s e i s s t i l l o u t s i d e t h e d o c k i n o r d e r t o r e s t o r e z o o m s t o 1 . 0
Timer {
id:check ListHovered
id:check RestoreZoom
repeat: false ;
interval: 150 ;
onTriggered: {
if ( ! root . containsMouse ( ) ) {
if ( ! dock . visibility . containsMouse || ( rootMouseArea . containsMouse && ! root . editMode ) ) {
if ( enableDirectRenderTimer . running )
enableDirectRenderTimer . stop ( ) ;
root . globalDirectRender = false ;
root . clearZoom ( ) ;
}
}
}
/ / t h i s t i m e r a d d s a d e l a y i n t o e n a b l i n g d i r e c t r e n d e r i n g . . .
/ / i t g i v e s t h e t i m e t o n e i g h b o u r t a s k s t o c o m p l e t e t h e i r a n i m a t i o n
/ / d u r i n g f i r s t h o v e r i n g p h a s e
Timer {
id: enableDirectRenderTimer
interval: 4 * root . durationTime * units . shortDuration
onTriggered: {
if ( dock . visibility . containsMouse )
root . globalDirectRender = true ;
}
}
/ / t h i s i s a d e l a y e r t o u p d a t e m a s k a r e a , i t i s u s e d i n c a s e s
/ / t h a t a n i m a t i o n s c a n n o t c a t c h u p w i t h a n i m a t i o n s s i g n a l s
/ / e . g . t h e a u t o m a i c I c o n S i z e c a s e
@ -1823,14 +1795,5 @@ DragDrop.DropArea {
}
}
/ / t h i s t i m e r a d d s a d e l a y i n t o e n a b l i n g d i r e c t r e n d e r i n g . . .
/ / i t g i v e s t h e t i m e t o n e i g h b o u r t a s k s t o c o m p l e t e t h e i r a n i m a t i o n
/ / d u r i n g f i r s t h o v e r i n g p h a s e
Timer {
id: enableDirectRenderTimer
interval: 4 * root . durationTime * units . shortDuration
onTriggered: layoutsContainer . directRender = true ;
}
/ / / / / / / / / / / / / / / E N D T I M E R e l e m e n t s
}