rename wrapper to ParabolicItem

work/spdx
Michail Vourlakos 4 years ago
parent a758e8a2ba
commit cfaa216438

@ -25,8 +25,8 @@ import org.kde.latte.core 0.2 as LatteCore
Item{ Item{
id: hiddenSpacer id: hiddenSpacer
//we add one missing pixel from calculations //we add one missing pixel from calculations
width: root.vertical ? wrapper.width : nHiddenSize width: root.vertical ? taskItem.parabolicItem.width : nHiddenSize
height: root.vertical ? nHiddenSize : wrapper.height height: root.vertical ? nHiddenSize : taskItem.parabolicItem.height
visible: (rightSpacer ? index === taskItem.abilities.indexer.lastVisibleItemIndex : index === taskItem.abilities.indexer.firstVisibleItemIndex) visible: (rightSpacer ? index === taskItem.abilities.indexer.lastVisibleItemIndex : index === taskItem.abilities.indexer.firstVisibleItemIndex)
|| (separatorSpace > 0) || taskItem.inAttentionAnimation || (separatorSpace > 0) || taskItem.inAttentionAnimation
@ -81,7 +81,7 @@ Item{
id: animatedBehavior id: animatedBehavior
enabled: (taskItem.inFastRestoreAnimation || showWindowAnimation.running || restoreAnimation.running enabled: (taskItem.inFastRestoreAnimation || showWindowAnimation.running || restoreAnimation.running
|| root.inActivityChange || taskItem.inRemoveStage) || root.inActivityChange || taskItem.inRemoveStage)
|| (taskItem.containsMouse && inAttentionAnimation && wrapper.mScale!==taskItem.abilities.parabolic.factor.zoom) || (taskItem.containsMouse && inAttentionAnimation && taskItem.parabolicItem.mScale!==taskItem.abilities.parabolic.factor.zoom)
NumberAnimation{ duration: 3 * taskItem.animationTime } NumberAnimation{ duration: 3 * taskItem.animationTime }
} }

@ -39,7 +39,7 @@ AbilityItem.IndicatorLevel {
return visualLockedWidth; return visualLockedWidth;
} }
return !root.vertical ? taskItem.wrapper.width - 2*taskItem.wrapper.mScale*taskItem.abilities.metrics.margin.length: taskItem.wrapper.width; return !root.vertical ? taskItem.parabolicItem.width - 2*taskItem.parabolicItem.mScale*taskItem.abilities.metrics.margin.length: taskItem.parabolicItem.width;
} }
height: { height: {
@ -47,7 +47,7 @@ AbilityItem.IndicatorLevel {
return visualLockedHeight; return visualLockedHeight;
} }
return root.vertical ? taskItem.wrapper.height - 2*taskItem.wrapper.mScale*taskItem.abilities.metrics.margin.length : taskItem.wrapper.height; return root.vertical ? taskItem.parabolicItem.height - 2*taskItem.parabolicItem.mScale*taskItem.abilities.metrics.margin.length : taskItem.parabolicItem.height;
} }
level.isDrawn: level.indicator && level.indicator.host && level.indicator.host.isEnabled && !taskItem.isSeparator && !taskItem.isHidden level.isDrawn: level.indicator && level.indicator.host && level.indicator.host.isEnabled && !taskItem.isSeparator && !taskItem.isHidden

@ -31,7 +31,7 @@ Item {
readonly property bool containsMouse: (taskItem.abilities.parabolic.currentParabolicItem === _parabolicArea) || parabolicMouseArea.containsMouse readonly property bool containsMouse: (taskItem.abilities.parabolic.currentParabolicItem === _parabolicArea) || parabolicMouseArea.containsMouse
readonly property real center: wrapper.center readonly property real center: taskItem.parabolicItem.center
MouseArea { MouseArea {
id: parabolicMouseArea id: parabolicMouseArea
@ -91,7 +91,7 @@ Item {
} }
if((inAnimation == false)&&(!root.taskInAnimation)&&(!root.disableRestoreZoom) && taskItem.hoverEnabled){ if((inAnimation == false)&&(!root.taskInAnimation)&&(!root.disableRestoreZoom) && taskItem.hoverEnabled){
if( ((wrapper.mScale === 1 || wrapper.mScale === taskItem.abilities.parabolic.factor.zoom) && !taskItem.abilities.parabolic.directRenderingEnabled) if( ((taskItem.parabolicItem.mScale === 1 || taskItem.parabolicItem.mScale === taskItem.abilities.parabolic.factor.zoom) && !taskItem.abilities.parabolic.directRenderingEnabled)
|| taskItem.abilities.parabolic.directRenderingEnabled || !taskItem.scalesUpdatedOnce) { || taskItem.abilities.parabolic.directRenderingEnabled || !taskItem.scalesUpdatedOnce) {
if(root.dragSource == null){ if(root.dragSource == null){
var step = Math.abs(icList.currentSpot-mousePos); var step = Math.abs(icList.currentSpot-mousePos);
@ -131,7 +131,7 @@ Item {
} }
if (!taskItem.inAttentionAnimation) { if (!taskItem.inAttentionAnimation) {
wrapper.mScale = taskItem.abilities.parabolic.factor.zoom; taskItem.parabolicItem.mScale = taskItem.abilities.parabolic.factor.zoom;
} else { } else {
var subSpacerScale = (taskItem.abilities.parabolic.factor.zoom-1)/2; var subSpacerScale = (taskItem.abilities.parabolic.factor.zoom-1)/2;
@ -157,14 +157,14 @@ Item {
if(nScale >= 0) { if(nScale >= 0) {
newScale = nScale + step; newScale = nScale + step;
} else { } else {
newScale = wrapper.mScale + step; newScale = taskItem.parabolicItem.mScale + step;
} }
if (inMimicParabolicAnimation && mimicParabolicScale === -1) { if (inMimicParabolicAnimation && mimicParabolicScale === -1) {
mimicParabolicScale = newScale; mimicParabolicScale = newScale;
} }
wrapper.mScale = newScale; taskItem.parabolicItem.mScale = newScale;
} }
} }
} }

@ -25,7 +25,7 @@ import org.kde.plasma.core 2.0 as PlasmaCore
import org.kde.latte.core 0.2 as LatteCore import org.kde.latte.core 0.2 as LatteCore
Item{ Item{
id: wrapper id: parabolicItem
opacity: 0 opacity: 0
width: { width: {
if (!taskItem.visible) if (!taskItem.visible)
@ -104,7 +104,7 @@ Item{
signal runLauncherAnimation(); signal runLauncherAnimation();
readonly property string bothAxisZoomEvent: wrapper + "_zoom" readonly property string bothAxisZoomEvent: parabolicItem + "_zoom"
/* Rectangle{ /* Rectangle{
anchors.fill: parent anchors.fill: parent
border.width: 1 border.width: 1
@ -143,8 +143,8 @@ Item{
anchors.horizontalCenterOffset: taskItem.iconOffsetX anchors.horizontalCenterOffset: taskItem.iconOffsetX
anchors.verticalCenterOffset: taskItem.iconOffsetY anchors.verticalCenterOffset: taskItem.iconOffsetY
width: wrapper.regulatorWidth width: parabolicItem.regulatorWidth
height: wrapper.regulatorHeight height: parabolicItem.regulatorHeight
TitleTooltipParent{ TitleTooltipParent{
id: _titleTooltipVisualParent id: _titleTooltipVisualParent
@ -159,13 +159,13 @@ Item{
onFormFactorChanged:{ onFormFactorChanged:{
taskItem.inAddRemoveAnimation = false; taskItem.inAddRemoveAnimation = false;
wrapper.mScale = 1.01; parabolicItem.mScale = 1.01;
wrapper.tempScaleWidth = 1.01; parabolicItem.tempScaleWidth = 1.01;
wrapper.tempScaleHeight = 1.01; parabolicItem.tempScaleHeight = 1.01;
wrapper.mScale = 1; parabolicItem.mScale = 1;
wrapper.tempScaleWidth = 1; parabolicItem.tempScaleWidth = 1;
wrapper.tempScaleHeight = 1; parabolicItem.tempScaleHeight = 1;
} }
} }
@ -177,13 +177,13 @@ Item{
property int zoomedSize: taskItem.abilities.parabolic.factor.zoom * taskItem.abilities.metrics.iconSize property int zoomedSize: taskItem.abilities.parabolic.factor.zoom * taskItem.abilities.metrics.iconSize
property real basicScalingWidth : wrapper.inTempScaling ? (taskItem.abilities.metrics.iconSize * wrapper.scaleWidth) : property real basicScalingWidth : parabolicItem.inTempScaling ? (taskItem.abilities.metrics.iconSize * parabolicItem.scaleWidth) :
taskItem.abilities.metrics.iconSize * wrapper.mScale taskItem.abilities.metrics.iconSize * parabolicItem.mScale
property real basicScalingHeight : wrapper.inTempScaling ? (taskItem.abilities.metrics.iconSize * wrapper.scaleHeight) : property real basicScalingHeight : parabolicItem.inTempScaling ? (taskItem.abilities.metrics.iconSize * parabolicItem.scaleHeight) :
taskItem.abilities.metrics.iconSize * wrapper.mScale taskItem.abilities.metrics.iconSize * parabolicItem.mScale
property real newTempSize: { property real newTempSize: {
if (wrapper.opacity === 1 ) { if (parabolicItem.opacity === 1 ) {
return Math.min(basicScalingWidth, basicScalingHeight); return Math.min(basicScalingWidth, basicScalingHeight);
} else { } else {
return Math.max(basicScalingWidth, basicScalingHeight); return Math.max(basicScalingWidth, basicScalingHeight);
@ -253,7 +253,7 @@ Item{
if (!taskItem.visible) { if (!taskItem.visible) {
//! is mostly used when the user destroys tasks applet from the context menu and both //! is mostly used when the user destroys tasks applet from the context menu and both
//! axis animations should be released in that case //! axis animations should be released in that case
wrapper.sendEndOfNeedBothAxisAnimation(); parabolicItem.sendEndOfNeedBothAxisAnimation();
} }
} }
} }
@ -263,4 +263,4 @@ Item{
opacity = 1; opacity = 1;
} }
} }
}// Main task area // id:wrapper }//parabolicItem

@ -64,7 +64,7 @@ Item {
return height; return height;
} else if ( index === taskItem.abilities.indexer.firstVisibleItemIndex && !taskItem.containsMouse) { } else if ( index === taskItem.abilities.indexer.firstVisibleItemIndex && !taskItem.containsMouse) {
var shadowSize = (taskItem.abilities.myView.itemShadow.isEnabled ? taskItem.abilities.myView.itemShadow.size/2 : 0); var shadowSize = (taskItem.abilities.myView.itemShadow.isEnabled ? taskItem.abilities.myView.itemShadow.size/2 : 0);
return (wrapper.mScale * (taskItem.abilities.metrics.iconSize - shadowSize)); return (taskItem.parabolicItem.mScale * (taskItem.abilities.metrics.iconSize - shadowSize));
} else { } else {
return 999999; return 999999;
} }

@ -72,8 +72,8 @@ Loader{
anchors.left: centerInParent? undefined : parent.left anchors.left: centerInParent? undefined : parent.left
anchors.top: centerInParent? undefined : parent.top anchors.top: centerInParent? undefined : parent.top
anchors.centerIn: centerInParent? parent : undefined anchors.centerIn: centerInParent? parent : undefined
minimumWidth: 0.4 * (wrapper.mScale * taskItem.abilities.metrics.iconSize) minimumWidth: 0.4 * (taskItem.parabolicItem.mScale * taskItem.abilities.metrics.iconSize)
height: Math.max(24, 0.4 * (wrapper.mScale * taskItem.abilities.metrics.iconSize)) height: Math.max(24, 0.4 * (taskItem.parabolicItem.mScale * taskItem.abilities.metrics.iconSize))
style3d: taskItem.abilities.myView.badgesIn3DStyle style3d: taskItem.abilities.myView.badgesIn3DStyle
textValue: shorcutBadge.badgeString textValue: shorcutBadge.badgeString

@ -563,7 +563,7 @@ Item {
} }
PropertyAnimation { PropertyAnimation {
target: wrapper target: taskItem.parabolicItem
property: "mScale" property: "mScale"
to: 1 to: 1
duration: taskItem.abilities.parabolic.factor.zoom === 1 ? 0 : (isDraggedTransition.speed*1.2) duration: taskItem.abilities.parabolic.factor.zoom === 1 ? 0 : (isDraggedTransition.speed*1.2)
@ -651,7 +651,7 @@ Item {
} }
/* PropertyAnimation { /* PropertyAnimation {
target: wrapper target: taskItem.parabolicItem
property: "mScale" property: "mScale"
to: 1; to: 1;
duration: isDraggedTransition.speed duration: isDraggedTransition.speed

@ -64,14 +64,14 @@ Item {
} }
if (root.vertical) { if (root.vertical) {
return wrapper.width; return taskItem.parabolicItem.width;
} else { } else {
return hiddenSpacerLeft.width+wrapper.width+hiddenSpacerRight.width; return hiddenSpacerLeft.width+taskItem.parabolicItem.width+hiddenSpacerRight.width;
} }
} }
/*onWidthChanged: { /*onWidthChanged: {
console.log("T: " + itemIndex + " - " + launcherUrl + " - " + width + " _ "+ hiddenSpacerLeft.width + " _ " + wrapper.width + " _ " + hiddenSpacerRight.width); console.log("T: " + itemIndex + " - " + launcherUrl + " - " + width + " _ "+ hiddenSpacerLeft.width + " _ " + taskItem.parabolicItem.width + " _ " + hiddenSpacerRight.width);
}*/ }*/
height: { height: {
@ -91,9 +91,9 @@ Item {
} }
if (root.vertical) { if (root.vertical) {
return hiddenSpacerLeft.height + wrapper.height + hiddenSpacerRight.height; return hiddenSpacerLeft.height + taskItem.parabolicItem.height + hiddenSpacerRight.height;
} else { } else {
return wrapper.height; return taskItem.parabolicItem.height;
} }
} }
@ -146,7 +146,7 @@ Item {
property bool canPublishGeometries: (isWindow || isStartup || isGroupParent) && visible && width>=taskItem.abilities.metrics.iconSize && height>=taskItem.abilities.metrics.iconSize property bool canPublishGeometries: (isWindow || isStartup || isGroupParent) && visible && width>=taskItem.abilities.metrics.iconSize && height>=taskItem.abilities.metrics.iconSize
&& !taskItem.delayingRemove && !taskItem.delayingRemove
&& (wrapper.mScale===1 || wrapper.mScale===taskItem.abilities.parabolic.factor.zoom) //don't publish during zoom animation && (taskItem.parabolicItem.mScale===1 || taskItem.parabolicItem.mScale===taskItem.abilities.parabolic.factor.zoom) //don't publish during zoom animation
property bool hoveredFromDragging: (mouseHandler.hoveredItem === taskItem) || (mouseHandler.ignoredItem === taskItem) property bool hoveredFromDragging: (mouseHandler.hoveredItem === taskItem) || (mouseHandler.ignoredItem === taskItem)
@ -182,10 +182,10 @@ Item {
readonly property alias hoveredTimer: taskMouseArea.hoveredTimer readonly property alias hoveredTimer: taskMouseArea.hoveredTimer
readonly property alias mouseArea: taskMouseArea readonly property alias mouseArea: taskMouseArea
readonly property alias tooltipVisualParent: _wrapper.titleTooltipVisualParent readonly property alias tooltipVisualParent: taskItem.parabolicItem.titleTooltipVisualParent
readonly property alias previewsVisualParent: _wrapper.titleTooltipVisualParent readonly property alias previewsVisualParent: taskItem.parabolicItem.titleTooltipVisualParent
readonly property alias subWindows: subWindows readonly property alias subWindows: subWindows
readonly property alias wrapper: _wrapper readonly property alias parabolicItem: _parabolicItem
readonly property alias showWindowAnimation: _showWindowAnimation readonly property alias showWindowAnimation: _showWindowAnimation
readonly property alias restoreAnimation: _restoreAnimation readonly property alias restoreAnimation: _restoreAnimation
@ -303,7 +303,7 @@ Item {
onContentItemChanged: { onContentItemChanged: {
if (contentItem) { if (contentItem) {
contentItem.parent = wrapper.contentItemContainer; contentItem.parent = taskItem.parabolicItem.contentItemContainer;
} }
} }
@ -509,8 +509,8 @@ Item {
HiddenSpacer{ id:hiddenSpacerLeft;} HiddenSpacer{ id:hiddenSpacerLeft;}
Item{ Item{
width: wrapper.width width: taskItem.parabolicItem.width
height: wrapper.height height: taskItem.parabolicItem.height
AbilityItem.IndicatorObject { AbilityItem.IndicatorObject {
id: taskIndicatorObj id: taskIndicatorObj
@ -544,7 +544,7 @@ Item {
windowsCount: !root.disableAllWindowsFunctionality ? taskItem.windowsCount : 0 windowsCount: !root.disableAllWindowsFunctionality ? taskItem.windowsCount : 0
windowsMinimizedCount: !root.disableAllWindowsFunctionality ? taskItem.windowsMinimizedCount : 0 windowsMinimizedCount: !root.disableAllWindowsFunctionality ? taskItem.windowsMinimizedCount : 0
scaleFactor: taskItem.wrapper.mScale scaleFactor: taskItem.parabolicItem.mScale
panelOpacity: taskItem.abilities.myView.backgroundOpacity panelOpacity: taskItem.abilities.myView.backgroundOpacity
shadowColor: taskItem.abilities.myView.itemShadow.shadowSolidColor shadowColor: taskItem.abilities.myView.itemShadow.shadowSolidColor
@ -575,7 +575,7 @@ Item {
} }
} }
Wrapper{id: _wrapper} ParabolicItem{id: _parabolicItem}
//! Indicator Front Layer //! Indicator Front Layer
IndicatorLevel{ IndicatorLevel{
@ -756,7 +756,7 @@ Item {
function activateTask() { function activateTask() {
if( taskItem.isLauncher || root.disableAllWindowsFunctionality){ if( taskItem.isLauncher || root.disableAllWindowsFunctionality){
if (LatteCore.WindowSystem.compositingActive) { if (LatteCore.WindowSystem.compositingActive) {
wrapper.runLauncherAnimation(); taskItem.parabolicItem.runLauncherAnimation();
} else { } else {
launcherAction(); launcherAction();
} }
@ -985,14 +985,14 @@ Item {
//! this way we make sure that layouts that are in different activities that the current layout //! this way we make sure that layouts that are in different activities that the current layout
//! don't publish their geometries //! don't publish their geometries
if ( canPublishGeometries && (!taskItem.abilities.myView.isReady || (taskItem.abilities.myView.isReady && taskItem.abilities.myView.inCurrentLayout()))) { if ( canPublishGeometries && (!taskItem.abilities.myView.isReady || (taskItem.abilities.myView.isReady && taskItem.abilities.myView.inCurrentLayout()))) {
var globalChoords = backend.globalRect(wrapper.contentItemContainer); var globalChoords = backend.globalRect(taskItem.parabolicItem.contentItemContainer);
var limits = backend.globalRect(scrollableList); var limits = backend.globalRect(scrollableList);
//! Limit the published geometries boundaries at scrolling area boundaries //! Limit the published geometries boundaries at scrolling area boundaries
var adjX = Math.min(limits.x+limits.width, Math.max(limits.x, globalChoords.x)); var adjX = Math.min(limits.x+limits.width, Math.max(limits.x, globalChoords.x));
var adjY = Math.min(limits.y+limits.height, Math.max(limits.y, globalChoords.y)); var adjY = Math.min(limits.y+limits.height, Math.max(limits.y, globalChoords.y));
var length = taskItem.abilities.metrics.iconSize * wrapper.mScale; var length = taskItem.abilities.metrics.iconSize * taskItem.parabolicItem.mScale;
var thickness = length; var thickness = length;
//! Magic Lamp effect doesn't like coordinates outside the screen and //! Magic Lamp effect doesn't like coordinates outside the screen and
@ -1049,7 +1049,7 @@ Item {
function slotWaitingLauncherRemoved(launch) { function slotWaitingLauncherRemoved(launch) {
if ((isWindow || isStartup || isLauncher) && !visible && launch === launcherUrl) { if ((isWindow || isStartup || isLauncher) && !visible && launch === launcherUrl) {
wrapper.mScale = 1; taskItem.parabolicItem.mScale = 1;
visible = true; visible = true;
} }
} }
@ -1235,7 +1235,7 @@ Item {
Component.onCompleted: { Component.onCompleted: {
if (contentItem) { if (contentItem) {
contentItem.parent = wrapper.contentItemContainer; contentItem.parent = taskItem.parabolicItem.contentItemContainer;
} }
root.draggingFinished.connect(handlerDraggingFinished); root.draggingFinished.connect(handlerDraggingFinished);
@ -1278,7 +1278,7 @@ Item {
tasksExtendedManager.waitingLauncherRemoved.disconnect(slotWaitingLauncherRemoved); tasksExtendedManager.waitingLauncherRemoved.disconnect(slotWaitingLauncherRemoved);
wrapper.sendEndOfNeedBothAxisAnimation(); taskItem.parabolicItem.sendEndOfNeedBothAxisAnimation();
} }
/////Animations /////Animations

@ -264,7 +264,7 @@ MouseArea {
scrollableList.decreasePos(); scrollableList.decreasePos();
} else { } else {
if (isLauncher || root.disableAllWindowsFunctionality) { if (isLauncher || root.disableAllWindowsFunctionality) {
wrapper.runLauncherAnimation(); taskItem.parabolicItem.runLauncherAnimation();
} else if (isGroupParent) { } else if (isGroupParent) {
subWindows.activateNextTask(); subWindows.activateNextTask();
} else { } else {

@ -30,7 +30,6 @@ SequentialAnimation{
property int speed: taskItem.abilities.animations.speedFactor.current * taskItem.abilities.animations.duration.large property int speed: taskItem.abilities.animations.speedFactor.current * taskItem.abilities.animations.duration.large
property real maxMScale: Math.max(1,taskItem.abilities.parabolic.factor.zoom - (taskItem.abilities.parabolic.factor.zoom - 1) / 2) property real maxMScale: Math.max(1,taskItem.abilities.parabolic.factor.zoom - (taskItem.abilities.parabolic.factor.zoom - 1) / 2)
ParallelAnimation{
PropertyAnimation { PropertyAnimation {
target: brightnessTaskEffect target: brightnessTaskEffect
property: "brightness" property: "brightness"
@ -38,16 +37,7 @@ SequentialAnimation{
duration: clickedAnimation.speed duration: clickedAnimation.speed
easing.type: Easing.OutQuad easing.type: Easing.OutQuad
} }
/* PropertyAnimation {
target: wrapper
property: "mScale"
to: root.taskInAnimation ? 1 : Math.max(clickedAnimation.maxMScale, wrapper.mScale - (taskItem.abilities.parabolic.factor.zoom - 1) / 2)
duration: clickedAnimation.speed
easing.type: Easing.OutQuad
}*/
}
ParallelAnimation{
PropertyAnimation { PropertyAnimation {
target: brightnessTaskEffect target: brightnessTaskEffect
property: "brightness" property: "brightness"
@ -55,15 +45,6 @@ SequentialAnimation{
duration: clickedAnimation.speed duration: clickedAnimation.speed
easing.type: Easing.OutQuad easing.type: Easing.OutQuad
} }
/* PropertyAnimation {
target: wrapper
property: "mScale"
to: root.taskInAnimation ? 1 : taskItem.abilities.parabolic.factor.zoom
duration: clickedAnimation.speed
easing.type: Easing.OutQuad
}*/
}
onPressedChanged: { onPressedChanged: {
if(!running && pressed && !taskItem.abilities.indicators.info.providesClickedAnimation && if(!running && pressed && !taskItem.abilities.indicators.info.providesClickedAnimation &&

@ -37,7 +37,7 @@ SequentialAnimation{
ParallelAnimation { ParallelAnimation {
PropertyAnimation { PropertyAnimation {
target: wrapper target: taskItem.parabolicItem
property: "mScale" property: "mScale"
to: 1 to: 1
duration: fastRestoreAnimation.speed duration: fastRestoreAnimation.speed
@ -45,7 +45,7 @@ SequentialAnimation{
} }
PropertyAnimation { PropertyAnimation {
target: wrapper target: taskItem.parabolicItem
property: "tempScaleWidth" property: "tempScaleWidth"
to: 1 to: 1
duration: fastRestoreAnimation.speed duration: fastRestoreAnimation.speed
@ -53,7 +53,7 @@ SequentialAnimation{
} }
PropertyAnimation { PropertyAnimation {
target: wrapper target: taskItem.parabolicItem
property: "tempScaleHeight" property: "tempScaleHeight"
to: 1 to: 1
duration: fastRestoreAnimation.speed duration: fastRestoreAnimation.speed

@ -89,8 +89,8 @@ Item{
} }
} }
wrapper.tempScaleWidth = wrapper.mScale; taskItem.parabolicItem.tempScaleWidth = taskItem.parabolicItem.mScale;
wrapper.tempScaleHeight = wrapper.mScale; taskItem.parabolicItem.tempScaleHeight = taskItem.parabolicItem.mScale;
} }
function startLauncherAnimation(){ function startLauncherAnimation(){
@ -107,12 +107,12 @@ Item{
Component.onCompleted: { Component.onCompleted: {
wrapper.runLauncherAnimation.connect(startLauncherAnimation); taskItem.parabolicItem.runLauncherAnimation.connect(startLauncherAnimation);
} }
Component.onDestruction: { Component.onDestruction: {
clearAnimationsSignals(); clearAnimationsSignals();
wrapper.runLauncherAnimation.disconnect(startLauncherAnimation); taskItem.parabolicItem.runLauncherAnimation.disconnect(startLauncherAnimation);
} }
} }
/////////////////// end of launcher animation /////////////////// end of launcher animation

@ -53,8 +53,8 @@ Item{
newWindowAnimationLoader.item.stop(); newWindowAnimationLoader.item.stop();
// iconImageBuffer.anchors.centerIn = iconImageBuffer.parent; // iconImageBuffer.anchors.centerIn = iconImageBuffer.parent;
wrapper.tempScaleWidth = 1; taskItem.parabolicItem.tempScaleWidth = 1;
wrapper.tempScaleHeight = 1; taskItem.parabolicItem.tempScaleHeight = 1;
taskItem.setBlockingAnimation(false); taskItem.setBlockingAnimation(false);
taskItem.inAttentionAnimation = false; taskItem.inAttentionAnimation = false;
@ -71,8 +71,8 @@ Item{
taskItem.setBlockingAnimation(true); taskItem.setBlockingAnimation(true);
taskItem.inNewWindowAnimation = true; taskItem.inNewWindowAnimation = true;
wrapper.tempScaleWidth = wrapper.mScale; taskItem.parabolicItem.tempScaleWidth = taskItem.parabolicItem.mScale;
wrapper.tempScaleHeight = wrapper.mScale; taskItem.parabolicItem.tempScaleHeight = taskItem.parabolicItem.mScale;
if(!isDemandingAttention) if(!isDemandingAttention)
newWindowAnimationLoader.item.loops = 1; newWindowAnimationLoader.item.loops = 1;

@ -115,9 +115,9 @@ SequentialAnimation {
taskItem.abilities.animations.needLength.addEvent(needLengthEvent); taskItem.abilities.animations.needLength.addEvent(needLengthEvent);
if (wrapper.mScale > 1 && !taskRealRemovalAnimation.enabledAnimation if (taskItem.parabolicItem.mScale > 1 && !taskRealRemovalAnimation.enabledAnimation
&& !taskItem.inBouncingAnimation && LatteCore.WindowSystem.compositingActive) { && !taskItem.inBouncingAnimation && LatteCore.WindowSystem.compositingActive) {
tasksExtendedManager.setFrozenTask(taskItem.launcherUrl, wrapper.mScale); tasksExtendedManager.setFrozenTask(taskItem.launcherUrl, taskItem.parabolicItem.mScale);
} }
} }
} }
@ -125,7 +125,7 @@ SequentialAnimation {
//Ghost animation that acts as a delayer in case there is a bouncing animation //Ghost animation that acts as a delayer in case there is a bouncing animation
//taking place //taking place
PropertyAnimation { PropertyAnimation {
target: wrapper target: taskItem.parabolicItem
property: "opacity" property: "opacity"
to: 1 to: 1
@ -139,14 +139,14 @@ SequentialAnimation {
//end of ghost animation //end of ghost animation
PropertyAnimation { PropertyAnimation {
target: wrapper target: taskItem.parabolicItem
property: "mScale" property: "mScale"
to: 1 to: 1
duration: taskRealRemovalAnimation.enabledAnimation ? showWindowAnimation.speed : 0 duration: taskRealRemovalAnimation.enabledAnimation ? showWindowAnimation.speed : 0
easing.type: Easing.InQuad easing.type: Easing.InQuad
} }
//PropertyAction { target: wrapper; property: "opacity"; value: isWindow ? 0 : 1 } //PropertyAction { target: taskItem.parabolicItem; property: "opacity"; value: isWindow ? 0 : 1 }
//animation mainly for launchers removal and startups //animation mainly for launchers removal and startups
ParallelAnimation{ ParallelAnimation{
id: removalAnimation id: removalAnimation
@ -154,7 +154,7 @@ SequentialAnimation {
// property int speed: (IsStartup && !taskItem.visible)? 0 : 400 // property int speed: (IsStartup && !taskItem.visible)? 0 : 400
//property int speed: 400 //property int speed: 400
NumberAnimation { NumberAnimation {
target: wrapper; target: taskItem.parabolicItem;
property: "opacity"; property: "opacity";
to: 0; to: 0;
duration: taskRealRemovalAnimation.enabledAnimation ? 1.35*showWindowAnimation.speed : 0 duration: taskRealRemovalAnimation.enabledAnimation ? 1.35*showWindowAnimation.speed : 0
@ -162,7 +162,7 @@ SequentialAnimation {
} }
PropertyAnimation { PropertyAnimation {
target: wrapper target: taskItem.parabolicItem
property: (icList.orientation === Qt.Vertical) ? "tempScaleWidth" : "tempScaleHeight" property: (icList.orientation === Qt.Vertical) ? "tempScaleWidth" : "tempScaleHeight"
to: 0 to: 0
duration: taskRealRemovalAnimation.enabledAnimation ? 1.35*showWindowAnimation.speed : 0 duration: taskRealRemovalAnimation.enabledAnimation ? 1.35*showWindowAnimation.speed : 0
@ -172,7 +172,7 @@ SequentialAnimation {
//smooth move into place the surrounding tasks //smooth move into place the surrounding tasks
PropertyAnimation { PropertyAnimation {
target: wrapper target: taskItem.parabolicItem
property: (icList.orientation === Qt.Vertical) ? "tempScaleHeight" : "tempScaleWidth" property: (icList.orientation === Qt.Vertical) ? "tempScaleHeight" : "tempScaleWidth"
to: 0 to: 0
duration: taskRealRemovalAnimation.enabledAnimation ? 1.35*showWindowAnimation.speed : 0 duration: taskRealRemovalAnimation.enabledAnimation ? 1.35*showWindowAnimation.speed : 0

@ -26,27 +26,11 @@ import org.kde.plasma.plasmoid 2.0
SequentialAnimation{ SequentialAnimation{
id: restoreAnimation id: restoreAnimation
ParallelAnimation{
PropertyAnimation { PropertyAnimation {
target: wrapper target: taskItem.parabolicItem
property: "mScale" property: "mScale"
to: 1 to: 1
duration: 3 * taskItem.animationTime duration: 3 * taskItem.animationTime
easing.type: Easing.InCubic easing.type: Easing.InCubic
} }
}
//! debug code based on third task
/*ScriptAction{
script: {
if (index===2) {
console.log("restore script ended correctly...");
}
}
}
onStarted: {
if (index === 2)
console.log("restore animation started...");
} */
} }

@ -34,7 +34,7 @@ SequentialAnimation{
//Ghost animation that acts as a delayer, in order to fix #342 //Ghost animation that acts as a delayer, in order to fix #342
PropertyAnimation { PropertyAnimation {
target: wrapper target: taskItem.parabolicItem
property: "opacity" property: "opacity"
to: 0 to: 0
//it is not depend to durationTime when animations are active //it is not depend to durationTime when animations are active
@ -53,7 +53,7 @@ SequentialAnimation{
} }
PropertyAnimation { PropertyAnimation {
target: wrapper target: taskItem.parabolicItem
property: (icList.orientation == Qt.Vertical) ? "tempScaleHeight" : "tempScaleWidth" property: (icList.orientation == Qt.Vertical) ? "tempScaleHeight" : "tempScaleWidth"
to: 1 to: 1
duration: showWindowAnimation.speed duration: showWindowAnimation.speed
@ -63,7 +63,7 @@ SequentialAnimation{
ParallelAnimation{ ParallelAnimation{
PropertyAnimation { PropertyAnimation {
target: wrapper target: taskItem.parabolicItem
property: (icList.orientation == Qt.Vertical) ? "tempScaleWidth" : "tempScaleHeight" property: (icList.orientation == Qt.Vertical) ? "tempScaleWidth" : "tempScaleHeight"
to: 1 to: 1
duration: showWindowAnimation.speed duration: showWindowAnimation.speed
@ -72,7 +72,7 @@ SequentialAnimation{
PropertyAnimation { PropertyAnimation {
target: wrapper target: taskItem.parabolicItem
property: "opacity" property: "opacity"
from: 0 from: 0
to: 1 to: 1
@ -153,41 +153,41 @@ SequentialAnimation{
if (hideWindow) { if (hideWindow) {
isForcedHidden = true; isForcedHidden = true;
taskItem.visible = false; taskItem.visible = false;
wrapper.tempScaleWidth = 0; taskItem.parabolicItem.tempScaleWidth = 0;
wrapper.tempScaleHeight = 0; taskItem.parabolicItem.tempScaleHeight = 0;
wrapper.opacity = 0; taskItem.parabolicItem.opacity = 0;
taskItem.inAnimation = false; taskItem.inAnimation = false;
} else if (!LatteCore.WindowSystem.compositingActive || root.inDraggingPhase } else if (!LatteCore.WindowSystem.compositingActive || root.inDraggingPhase
|| taskItem.isSeparator) { || taskItem.isSeparator) {
isForcedHidden = false; isForcedHidden = false;
taskItem.visible = true; taskItem.visible = true;
wrapper.tempScaleWidth = 1; taskItem.parabolicItem.tempScaleWidth = 1;
wrapper.tempScaleHeight = 1; taskItem.parabolicItem.tempScaleHeight = 1;
wrapper.mScale = 1; taskItem.parabolicItem.mScale = 1;
wrapper.opacity = 1; taskItem.parabolicItem.opacity = 1;
taskItem.inAnimation = false; taskItem.inAnimation = false;
} else if (( animation2 || animation3 || animation6 || isForcedHidden) } else if (( animation2 || animation3 || animation6 || isForcedHidden)
&& (taskItem.abilities.animations.speedFactor.current !== 0) && !launcherIsAlreadyShown){ && (taskItem.abilities.animations.speedFactor.current !== 0) && !launcherIsAlreadyShown){
isForcedHidden = false; isForcedHidden = false;
taskItem.visible = true; taskItem.visible = true;
wrapper.tempScaleWidth = 0; taskItem.parabolicItem.tempScaleWidth = 0;
wrapper.tempScaleHeight = 0; taskItem.parabolicItem.tempScaleHeight = 0;
start(); start();
} else { } else {
isForcedHidden = false; isForcedHidden = false;
var frozenTask = tasksExtendedManager.getFrozenTask(taskItem.launcherUrl); var frozenTask = tasksExtendedManager.getFrozenTask(taskItem.launcherUrl);
if (frozenTask && frozenTask.mScale>1) { if (frozenTask && frozenTask.mScale>1) {
wrapper.mScale = frozenTask.mScale; taskItem.parabolicItem.mScale = frozenTask.mScale;
tasksExtendedManager.removeFrozenTask(taskItem.launcherUrl); tasksExtendedManager.removeFrozenTask(taskItem.launcherUrl);
} else { } else {
wrapper.tempScaleWidth = 1; taskItem.parabolicItem.tempScaleWidth = 1;
wrapper.tempScaleHeight = 1; taskItem.parabolicItem.tempScaleHeight = 1;
} }
//! by enabling it we break the bouncing animation //! by enabling it we break the bouncing animation
//taskItem.visible = true; //taskItem.visible = true;
wrapper.opacity = 1; taskItem.parabolicItem.opacity = 1;
taskItem.inAnimation = false; taskItem.inAnimation = false;
} }
} }

@ -24,7 +24,7 @@ import org.kde.plasma.plasmoid 2.0
SequentialAnimation{ SequentialAnimation{
//Ghost animation that acts as a delayer //Ghost animation that acts as a delayer
PropertyAnimation { PropertyAnimation {
target: wrapper target: taskItem.parabolicItem
property: "opacity" property: "opacity"
to: 1 to: 1
duration: 50 duration: 50
@ -34,7 +34,7 @@ SequentialAnimation{
ParallelAnimation{ ParallelAnimation{
PropertyAnimation { PropertyAnimation {
target: wrapper target: taskItem.parabolicItem
property: (icList.orientation == Qt.Vertical) ? "tempScaleWidth" : "tempScaleHeight" property: (icList.orientation == Qt.Vertical) ? "tempScaleWidth" : "tempScaleHeight"
to: taskItem.containsMouse ? 1+2*(taskItem.abilities.parabolic.factor.maxZoom-1) : 1 + (1.5 * (taskItem.abilities.parabolic.factor.maxZoom-1)) to: taskItem.containsMouse ? 1+2*(taskItem.abilities.parabolic.factor.maxZoom-1) : 1 + (1.5 * (taskItem.abilities.parabolic.factor.maxZoom-1))
duration: launcherAnimation.speed duration: launcherAnimation.speed
@ -42,7 +42,7 @@ SequentialAnimation{
} }
PropertyAnimation { PropertyAnimation {
target: wrapper target: taskItem.parabolicItem
property: (icList.orientation == Qt.Horizontal) ? "tempScaleWidth" : "tempScaleHeight" property: (icList.orientation == Qt.Horizontal) ? "tempScaleWidth" : "tempScaleHeight"
to: 1 to: 1
duration: launcherAnimation.speed duration: launcherAnimation.speed
@ -51,7 +51,7 @@ SequentialAnimation{
} }
PropertyAnimation { PropertyAnimation {
target: wrapper target: taskItem.parabolicItem
property: (icList.orientation === Qt.Vertical) ? "tempScaleWidth" : "tempScaleHeight" property: (icList.orientation === Qt.Vertical) ? "tempScaleWidth" : "tempScaleHeight"
to: 1 to: 1
duration: 4*launcherAnimation.speed duration: 4*launcherAnimation.speed
@ -60,7 +60,7 @@ SequentialAnimation{
ParallelAnimation{ ParallelAnimation{
PropertyAnimation { PropertyAnimation {
target: wrapper target: taskItem.parabolicItem
property: (icList.orientation === Qt.Vertical) ? "tempScaleHeight" : "tempScaleWidth" property: (icList.orientation === Qt.Vertical) ? "tempScaleHeight" : "tempScaleWidth"
to: 1 to: 1
duration: taskItem.abilities.animations.speedFactor.current*launcherAnimation.speed duration: taskItem.abilities.animations.speedFactor.current*launcherAnimation.speed
@ -68,7 +68,7 @@ SequentialAnimation{
} }
PropertyAnimation { PropertyAnimation {
target: wrapper target: taskItem.parabolicItem
property: "mScale" property: "mScale"
to: 1 to: 1
duration: taskItem.abilities.animations.speedFactor.current*launcherAnimation.speed duration: taskItem.abilities.animations.speedFactor.current*launcherAnimation.speed

@ -26,7 +26,7 @@ SequentialAnimation{
ParallelAnimation{ ParallelAnimation{
PropertyAnimation { PropertyAnimation {
target: wrapper target: taskItem.parabolicItem
property: (icList.orientation == Qt.Vertical) ? "tempScaleWidth" : "tempScaleHeight" property: (icList.orientation == Qt.Vertical) ? "tempScaleWidth" : "tempScaleHeight"
to: 1 + (thickPercentage * 2 * (taskItem.abilities.animations.requirements.zoomFactor-1)) to: 1 + (thickPercentage * 2 * (taskItem.abilities.animations.requirements.zoomFactor-1))
duration: newWindowAnimation.speed duration: newWindowAnimation.speed
@ -36,7 +36,7 @@ SequentialAnimation{
} }
PropertyAnimation { PropertyAnimation {
target: wrapper target: taskItem.parabolicItem
property: (icList.orientation == Qt.Horizontal) ? "tempScaleWidth" : "tempScaleHeight" property: (icList.orientation == Qt.Horizontal) ? "tempScaleWidth" : "tempScaleHeight"
to: 1 to: 1
duration: newWindowAnimation.speed duration: newWindowAnimation.speed
@ -45,7 +45,7 @@ SequentialAnimation{
} }
PropertyAnimation { PropertyAnimation {
target: wrapper target: taskItem.parabolicItem
property: (icList.orientation == Qt.Vertical) ? "tempScaleWidth" : "tempScaleHeight" property: (icList.orientation == Qt.Vertical) ? "tempScaleWidth" : "tempScaleHeight"
to: 1 to: 1
duration: 4.4*newWindowAnimation.speed duration: 4.4*newWindowAnimation.speed

Loading…
Cancel
Save