Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Plasma
KWin
Commits
c81fe56d
Commit
c81fe56d
authored
Jan 07, 2021
by
Alex Rosca
Committed by
Nate Graham
Jan 07, 2021
Browse files
effects: Add an animation curve to maximize and fullscreen
Replace the default linear easing curve with OutCubic.
parent
49faf679
Changes
2
Hide whitespace changes
Inline
Side-by-side
effects/fullscreen/package/contents/code/fullscreen.js
View file @
c81fe56d
...
...
@@ -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
}]
});
}
...
...
effects/maximize/package/contents/code/maximize.js
View file @
c81fe56d
...
...
@@ -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
}]
});
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment