[gnome-shell] layout: Show and hide keyboard using translation_y



commit 255627bd698061fb5c56cdc6c6080be558c1003c
Author: Jonas Dreßler <verdre v0yd nl>
Date:   Thu Feb 20 14:23:01 2020 +0100

    layout: Show and hide keyboard using translation_y
    
    ClutterActors anchor-y property is deprecated, which means we get a
    warning when animating it, so use the translation property instead to
    show or hide the osk.
    
    https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/1039

 js/ui/layout.js | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/js/ui/layout.js b/js/ui/layout.js
index c7dd6287f7..a02cab6415 100644
--- a/js/ui/layout.js
+++ b/js/ui/layout.js
@@ -738,7 +738,7 @@ var LayoutManager = GObject.registerClass({
     showKeyboard() {
         this.keyboardBox.show();
         this.keyboardBox.ease({
-            anchor_y: this.keyboardBox.height,
+            translation_y: -this.keyboardBox.height,
             opacity: 255,
             duration: KEYBOARD_ANIMATION_TIME,
             mode: Clutter.AnimationMode.EASE_OUT_QUAD,
@@ -755,7 +755,7 @@ var LayoutManager = GObject.registerClass({
         this._updateRegions();
 
         this._keyboardHeightNotifyId = this.keyboardBox.connect('notify::height', () => {
-            this.keyboardBox.anchor_y = this.keyboardBox.height;
+            this.keyboardBox.translation_y = -this.keyboardBox.height;
         });
     }
 
@@ -765,7 +765,7 @@ var LayoutManager = GObject.registerClass({
             this._keyboardHeightNotifyId = 0;
         }
         this.keyboardBox.ease({
-            anchor_y: 0,
+            translation_y: this.keyboardBox.height,
             opacity: 0,
             duration: immediate ? 0 : KEYBOARD_ANIMATION_TIME,
             mode: Clutter.AnimationMode.EASE_IN_QUAD,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]