effects: Add an animation curve to maximize and fullscreen

Replace the default linear easing curve with OutCubic.
This commit is contained in:
Rosca Alex 2021-01-07 20:06:57 +01:00 committed by Nate Graham
parent 49faf6790f
commit c81fe56d7c
2 changed files with 12 additions and 6 deletions

View file

@ -37,7 +37,8 @@ var fullScreenEffect = {
from: {
value1: oldGeometry.width,
value2: oldGeometry.height
}
},
curve: QEasingCurve.OutCubic
}, {
type: Effect.Translation,
to: {
@ -47,7 +48,8 @@ var fullScreenEffect = {
from: {
value1: oldGeometry.x - newGeometry.x - (newGeometry.width / 2 - oldGeometry.width / 2),
value2: oldGeometry.y - newGeometry.y - (newGeometry.height / 2 - oldGeometry.height / 2)
}
},
curve: QEasingCurve.OutCubic
}]
});
if (!window.resize) {
@ -57,7 +59,8 @@ var fullScreenEffect = {
animations: [{
type: Effect.CrossFadePrevious,
to: 1.0,
from: 0.0
from: 0.0,
curve: QEasingCurve.OutCubic
}]
});
}

View file

@ -37,7 +37,8 @@ var maximizeEffect = {
from: {
value1: oldGeometry.width,
value2: oldGeometry.height
}
},
curve: QEasingCurve.OutCubic
}, {
type: Effect.Translation,
to: {
@ -47,7 +48,8 @@ var maximizeEffect = {
from: {
value1: oldGeometry.x - newGeometry.x - (newGeometry.width / 2 - oldGeometry.width / 2),
value2: oldGeometry.y - newGeometry.y - (newGeometry.height / 2 - oldGeometry.height / 2)
}
},
curve: QEasingCurve.OutCubic
}]
});
if (!window.resize) {
@ -57,7 +59,8 @@ var maximizeEffect = {
animations: [{
type: Effect.CrossFadePrevious,
to: 1.0,
from: 0.0
from: 0.0,
curve: QEasingCurve.OutCubic
}]
});
}