@ -294,6 +294,8 @@ Item{
return ;
}
var blockParabolicEffect = false ;
if ( isLattePlasmoid ) {
return ;
} else if ( appletItem . isInternalViewSplitter ) {
@ -307,6 +309,7 @@ Item{
}
else {
if ( applet && ( applet . Layout . minimumHeight > root . iconSize ) && root . isVertical && ! canBeHovered && ! communicator . overlayLatteIconIsActive ) {
blockParabolicEffect = true ;
layoutHeight = applet . Layout . minimumHeight ;
} / / i t i s u s e d f o r p l a s m o i d s t h a t n e e d t o s c a l e o n l y o n e a x i s . . . e . g . t h e W e a t h e r P l a s m o i d
else if ( applet
@ -316,16 +319,15 @@ Item{
&& root . isVertical
&& ! disableScaleWidth
&& ! communicator . overlayLatteIconIsActive ) {
disableScaleHeight = true ;
/ / t h i s w a y i m p r o v e s p e r f o r m a n c e , p r o b a b l y b e c a u s e d u r i n g a n i m a t i o n t h e p r e f e r r e d s i z e s u p d a t e a l o t
if ( ( applet . Layout . maximumHeight < root . iconSize ) ) {
layoutHeight = applet . Layout . maximumHeight ;
} else if ( applet . Layout . minimumHeight > root . iconSize ) {
blockParabolicEffect = true ;
layoutHeight = applet . Layout . minimumHeight ;
} else if ( ( applet . Layout . preferredHeight > root . iconSize )
|| ( appletItem . originalAppletBehavior && applet . Layout . preferredHeight > 0 ) ) {
blockParabolicEffect = true ;
layoutHeight = applet . Layout . preferredHeight ;
} else {
layoutHeight = root . iconSize ;
@ -334,6 +336,14 @@ Item{
layoutHeight = root . iconSize ;
}
}
if ( wrapper . zoomScale === 1 ) {
if ( blockParabolicEffect ) {
disableScaleHeight = true ;
} else {
disableScaleHeight = false ;
}
}
}
function updateLayoutWidth ( ) {
@ -344,6 +354,8 @@ Item{
return ;
}
var blockParabolicEffect = false ;
if ( isLattePlasmoid ) {
return ;
} else if ( appletItem . isInternalViewSplitter ) {
@ -357,6 +369,7 @@ Item{
}
else {
if ( applet && ( applet . Layout . minimumWidth > root . iconSize ) && root . isHorizontal && ! canBeHovered && ! communicator . overlayLatteIconIsActive ) {
blockParabolicEffect = true ;
layoutWidth = applet . Layout . minimumWidth ;
} / / i t i s u s e d f o r p l a s m o i d s t h a t n e e d t o s c a l e o n l y o n e a x i s . . . e . g . t h e W e a t h e r P l a s m o i d
else if ( applet
@ -367,16 +380,16 @@ Item{
&& ! disableScaleHeight
&& ! communicator . overlayLatteIconIsActive ) {
disableScaleWidth = true ;
/ / t h i s w a y i m p r o v e s p e r f o r m a n c e , p r o b a b l y b e c a u s e d u r i n g a n i m a t i o n t h e p r e f e r r e d s i z e s u p d a t e a l o t
if ( ( applet . Layout . maximumWidth < root . iconSize ) ) {
/ / r e t u r n a p p l e t . L a y o u t . m a x i m u m W i d t h ;
layoutWidth = applet . Layout . maximumWidth ;
} else if ( applet . Layout . minimumWidth > root . iconSize ) {
blockParabolicEffect = true ;
layoutWidth = applet . Layout . minimumWidth ;
} else if ( ( applet . Layout . preferredWidth > root . iconSize )
|| ( appletItem . originalAppletBehavior && applet . Layout . preferredWidth > 0 ) ) {
blockParabolicEffect = true ;
layoutWidth = applet . Layout . preferredWidth ;
} else {
layoutWidth = root . iconSize ;
@ -385,6 +398,14 @@ Item{
layoutWidth = root . iconSize ;
}
}
if ( wrapper . zoomScale === 1 ) {
if ( blockParabolicEffect ) {
disableScaleWidth = true ;
} else {
disableScaleWidth = false ;
}
}
}
Item {