Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Plasma
KWin
Commits
c81fe56d
Commit
c81fe56d
authored
Jan 07, 2021
by
Alex Rosca
Committed by
Nate Graham
Jan 07, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
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
Showing
2 changed files
with
12 additions
and
6 deletions
+12
-6
effects/fullscreen/package/contents/code/fullscreen.js
effects/fullscreen/package/contents/code/fullscreen.js
+6
-3
effects/maximize/package/contents/code/maximize.js
effects/maximize/package/contents/code/maximize.js
+6
-3
No files found.
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
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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