fix glitches for task inAttention bouncing

v0.7
Michail Vourlakos 7 years ago
parent 569fd5d702
commit 5a9e788d8f

@ -95,6 +95,8 @@ MouseArea{
property bool inAttentionAnimation: false
property bool inBlockingAnimation: false
property bool inBouncingAnimation: false
property bool inMimicParabolicAnimation: false
property real mimicParabolicScale: -1
property bool inPopup: false
property bool inRemoveStage: false
property bool inWheelAction: false
@ -360,16 +362,21 @@ MouseArea{
NumberAnimation { duration: 3 * mainItemContainer.animationTime }
}
Behavior on nScale {
/*Behavior on nScale {
enabled: root.globalDirectRender
NumberAnimation { duration: root.directRenderAnimationTime }
}
}*/
Behavior on nHiddenSize {
enabled: wrapper.opacity > 0
enabled: !root.globalDirectRender || mainItemContainer.inMimicParabolicAnimation
NumberAnimation { duration: 3 * mainItemContainer.animationTime }
}
Behavior on nHiddenSize {
enabled: root.globalDirectRender && !mainItemContainer.inMimicParabolicAnimation
NumberAnimation { duration: root.directRenderAnimationTime }
}
/* Rectangle{
width: !root.vertical ? parent.width : 1
height: !root.vertical ? 1 : parent.height
@ -452,10 +459,15 @@ MouseArea{
}
Behavior on nHiddenSize {
enabled: wrapper.opacity > 0
enabled: !root.globalDirectRender || mainItemContainer.inMimicParabolicAnimation
NumberAnimation { duration: 3 * mainItemContainer.animationTime }
}
Behavior on nHiddenSize {
enabled: root.globalDirectRender && !mainItemContainer.inMimicParabolicAnimation
NumberAnimation { duration: root.directRenderAnimationTime }
}
/* Rectangle{
width: !root.vertical ? parent.width : 1
height: !root.vertical ? 1 : parent.height
@ -1080,6 +1092,10 @@ MouseArea{
function slotMimicEnterForParabolic(){
if (containsMouse) {
if (!inBlockingAnimation || inAttentionAnimation) {
if (inMimicParabolicAnimation) {
mimicParabolicScale = root.zoomFactor;
}
wrapper.calculateScales(icList.currentSpot);
}
}

@ -106,7 +106,7 @@ Item{
signal runLauncherAnimation();
/* Rectangle{
/* Rectangle{
anchors.fill: parent
border.width: 1
border.color: "green"
@ -114,12 +114,12 @@ Item{
}*/
Behavior on mScale {
enabled: !root.globalDirectRender
enabled: !root.globalDirectRender || inMimicParabolicAnimation
NumberAnimation { duration: 3 * mainItemContainer.animationTime }
}
Behavior on mScale {
enabled: root.globalDirectRender
enabled: root.globalDirectRender && !inMimicParabolicAnimation
NumberAnimation { duration: root.directRenderAnimationTime }
}
@ -242,11 +242,19 @@ Item{
hiddenSpacerLeft.nScale = subSpacerScale;
hiddenSpacerRight.nScale = subSpacerScale;
} else if (!inBlockingAnimation) {
var newScale = 1;
if(nScale >= 0) {
mScale = nScale + step;
newScale = nScale + step;
} else {
mScale = mScale + step;
newScale = mScale + step;
}
if (inMimicParabolicAnimation && mimicParabolicScale === -1) {
mimicParabolicScale = newScale;
}
mScale = newScale;
}
// console.log(index+ ", "+mScale);
}
@ -264,6 +272,12 @@ Item{
root.startEnableDirectRenderTimer();
}
if (inMimicParabolicAnimation && mScale === mimicParabolicScale){
inMimicParabolicAnimation = false;
mimicParabolicScale = -1;
}
if ((mScale > 1) && !mainItemContainer.isZoomed) {
mainItemContainer.isZoomed = true;
root.signalAnimationsNeedBothAxis(1);

@ -23,61 +23,67 @@ import QtQuick 2.0
import org.kde.plasma.plasmoid 2.0
///////Restore Zoom Animation/////
ParallelAnimation{
SequentialAnimation{
id: fastRestoreAnimation
property int speed: 5*mainItemContainer.animationTime
PropertyAnimation {
target: wrapper
property: "mScale"
to: 1
duration: fastRestoreAnimation.speed
easing.type: Easing.Linear
ScriptAction {
script: {
mainItemContainer.inMimicParabolicAnimation = true;
}
}
PropertyAnimation {
target: wrapper
property: "tempScaleWidth"
to: 1
duration: fastRestoreAnimation.speed
easing.type: Easing.Linear
}
ParallelAnimation {
PropertyAnimation {
target: wrapper
property: "mScale"
to: 1
duration: fastRestoreAnimation.speed
easing.type: Easing.Linear
}
PropertyAnimation {
target: wrapper
property: "tempScaleHeight"
to: 1
duration: fastRestoreAnimation.speed
easing.type: Easing.Linear
}
PropertyAnimation {
target: wrapper
property: "tempScaleWidth"
to: 1
duration: fastRestoreAnimation.speed
easing.type: Easing.Linear
}
PropertyAnimation {
target: hiddenSpacerLeft
property: "nScale"
to: 0
duration: fastRestoreAnimation.speed
easing.type: Easing.Linear
}
PropertyAnimation {
target: wrapper
property: "tempScaleHeight"
to: 1
duration: fastRestoreAnimation.speed
easing.type: Easing.Linear
}
PropertyAnimation {
target: hiddenSpacerLeft
property: "nScale"
to: 0
duration: fastRestoreAnimation.speed
easing.type: Easing.Linear
}
PropertyAnimation {
target: hiddenSpacerRight
property: "nScale"
to: 0
duration: fastRestoreAnimation.speed
easing.type: Easing.Linear
PropertyAnimation {
target: hiddenSpacerRight
property: "nScale"
to: 0
duration: fastRestoreAnimation.speed
easing.type: Easing.Linear
}
}
onStopped: {
if (latteDock)
latteDock.setGlobalDirectRender(false);
else
icList.directRender = false;
if (newWindowAnimation.paused){
if (!mainItemContainer.containsMouse && !parabolicManager.neighbourIsHovered(itemIndex)) {
mainItemContainer.inMimicParabolicAnimation = false;
}
newWindowAnimation.stop();
root.mimicEnterForParabolic();
//wrapper.calculateScales((root.iconSize+root.iconMargin)/2);
}
}

Loading…
Cancel
Save