[epiphany/mcatanzaro/thumbnail-background-position: 2/2] Fix background position for overview thumbnails



commit f14ea9e4ec763363a05bdacc27cd14fe648ab670
Author: Michael Catanzaro <mcatanzaro gnome org>
Date:   Tue Aug 6 12:17:55 2019 -0500

    Fix background position for overview thumbnails
    
    The top portion of overview thumbnails is being cut off. Tobias has
    suggested using background-position: top to fix this, but doing so
    breaks our placeholder icon, which really needs to be centered. So let's
    update the position as needed whenever updating the thumbnail path.

 embed/web-process-extension/resources/js/overview.js | 2 ++
 1 file changed, 2 insertions(+)
---
diff --git a/embed/web-process-extension/resources/js/overview.js 
b/embed/web-process-extension/resources/js/overview.js
index 62fd1c61d..eaab98dd7 100644
--- a/embed/web-process-extension/resources/js/overview.js
+++ b/embed/web-process-extension/resources/js/overview.js
@@ -240,8 +240,10 @@ Ephy.Overview.Item = class OverviewItem
         if (path) {
             this._thumbnail.style.backgroundImage = 'url(file://' + path + ')';
             this._thumbnail.style.backgroundSize = '100%';
+            this._thumbnail.style.backgroundPosition = 'top';
         } else {
             this._thumbnail.style.backgroundImage = '';
+            this._thumbnail.style.backgroundPosition = 'center';
         }
     }
 


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