[gnome-shell/gbsneto/folder-dialog-improvements: 5/18] appDisplay: Zoom dialog child in and out



commit 9db9ed58872dbae2466d6fb9499d8e3b1663652c
Author: Georges Basile Stavracas Neto <georges stavracas gmail com>
Date:   Thu Jun 4 22:05:11 2020 -0300

    appDisplay: Zoom dialog child in and out
    
    Instead of zooming the dialog itself, zoom its only
    child, which is the "actual" user-visible dialog.
    
    https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1301

 js/ui/appDisplay.js | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)
---
diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js
index e018aa96e0..a52b28fd4e 100644
--- a/js/ui/appDisplay.js
+++ b/js/ui/appDisplay.js
@@ -1609,17 +1609,17 @@ var AppFolderDialog = GObject.registerClass({
         let [sourceX, sourceY] =
             this._source.get_transformed_position();
         let [dialogX, dialogY] =
-            this.get_transformed_position();
+            this.child.get_transformed_position();
 
-        this.set({
+        this.child.set({
             translation_x: sourceX - dialogX,
             translation_y: sourceY - dialogY,
-            scale_x: this._source.width / this.width,
-            scale_y: this._source.height / this.height,
+            scale_x: this._source.width / this.child.width,
+            scale_y: this._source.height / this.child.height,
             opacity: 0,
         });
 
-        this.ease({
+        this.child.ease({
             translation_x: 0,
             translation_y: 0,
             scale_x: 1,
@@ -1649,18 +1649,18 @@ var AppFolderDialog = GObject.registerClass({
         let [sourceX, sourceY] =
             this._source.get_transformed_position();
         let [dialogX, dialogY] =
-            this.get_transformed_position();
+            this.child.get_transformed_position();
 
-        this.ease({
+        this.child.ease({
             translation_x: sourceX - dialogX,
             translation_y: sourceY - dialogY,
-            scale_x: this._source.width / this.width,
-            scale_y: this._source.height / this.height,
+            scale_x: this._source.width / this.child.width,
+            scale_y: this._source.height / this.child.height,
             opacity: 0,
             duration: FOLDER_DIALOG_ANIMATION_TIME,
             mode: Clutter.AnimationMode.EASE_OUT_QUAD,
             onComplete: () => {
-                this.set({
+                this.child.set({
                     translation_x: 0,
                     translation_y: 0,
                     scale_x: 1,


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