[epiphany] Fix overview remove animation



commit 76c15035f784ca8bc911e9ca7abdd292e894da7a
Author: Tobias Bernard <tbernard gnome org>
Date:   Fri Aug 30 10:04:53 2019 +0300

    Fix overview remove animation
    
    Restores the animation when removing an item from the overview,
    and makes it faster overall.

 embed/web-process-extension/resources/js/overview.js | 4 ++--
 src/resources/about.css                              | 6 ++----
 2 files changed, 4 insertions(+), 6 deletions(-)
---
diff --git a/embed/web-process-extension/resources/js/overview.js 
b/embed/web-process-extension/resources/js/overview.js
index df65a6272..ad9e9c8fc 100644
--- a/embed/web-process-extension/resources/js/overview.js
+++ b/embed/web-process-extension/resources/js/overview.js
@@ -79,7 +79,7 @@ Ephy.Overview = class Overview
     _removeItem(item)
     {
         item.classList.add('overview-removed');
-        // Animation takes 0.75s, remove the item after 1s to ensure the animation finished.
+        // Animation takes 0.25s, remove the item after 0.5s to ensure the animation finished.
         setTimeout(() => {
             item.parentNode.removeChild(item);
             for (let i = 0; i < this._items.length; i++) {
@@ -89,7 +89,7 @@ Ephy.Overview = class Overview
                 }
             }
             window.webkit.messageHandlers.overview.postMessage(item.href);
-        }, 1000);
+        }, 500);  // This value needs to be synced with the one in about.css
     }
 
     _onURLsChanged(urls)
diff --git a/src/resources/about.css b/src/resources/about.css
index 4bb6209f3..f34671cd3 100644
--- a/src/resources/about.css
+++ b/src/resources/about.css
@@ -352,11 +352,9 @@ html.epiphany-html {
 }
 
 .overview-removed.overview-item {
-    transition: all 0.75s ease-in-out;
-    width: 0;
-    margin: 0;
+    transition: all 0.25s ease-out;  /* This value needs to be synced with the timeout in overview.js */
+    transform: scale(0.5);
     opacity: 0;
-    padding: 0;
 }
 
 .overview-removed .overview-close-button {


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