[gnome-shell/wip/carlosg/osk-gesture-feedback: 29/31] keyboard: Use translation-y property for focus window animations
- From: Carlos Garnacho <carlosg src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/wip/carlosg/osk-gesture-feedback: 29/31] keyboard: Use translation-y property for focus window animations
- Date: Tue, 16 Feb 2021 13:49:20 +0000 (UTC)
commit 675eae2381157ff4b7993d1915524154c1e3e0dc
Author: Carlos Garnacho <carlosg gnome org>
Date: Fri Feb 12 00:53:21 2021 +0100
keyboard: Use translation-y property for focus window animations
Just the intermediate state, we still need to synchronize visual and
real window position after the animation.
js/ui/keyboard.js | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
---
diff --git a/js/ui/keyboard.js b/js/ui/keyboard.js
index a5304edace..f3a20c1c0c 100644
--- a/js/ui/keyboard.js
+++ b/js/ui/keyboard.js
@@ -1856,7 +1856,9 @@ var Keyboard = GObject.registerClass({
_windowSlideAnimationComplete(window, delta) {
// Synchronize window positions again.
+ const windowActor = window.get_compositor_private();
let frameRect = window.get_frame_rect();
+ windowActor.translation_y = 0;
frameRect.y += delta;
window.move_frame(true, frameRect.x, frameRect.y);
}
@@ -1869,7 +1871,7 @@ var Keyboard = GObject.registerClass({
if (show) {
windowActor.ease({
- y: windowActor.y - deltaY,
+ translation_y: -deltaY,
duration: KEYBOARD_ANIMATION_TIME,
mode: Clutter.AnimationMode.EASE_OUT_QUAD,
onComplete: () => {
@@ -1878,7 +1880,7 @@ var Keyboard = GObject.registerClass({
});
} else {
windowActor.ease({
- y: windowActor.y + deltaY,
+ translation_y: deltaY,
duration: KEYBOARD_ANIMATION_TIME,
mode: Clutter.AnimationMode.EASE_IN_QUAD,
onComplete: () => {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]