[gnome-shell] appDisplay: Increase fade offset in FolderView



commit 387184b052f6969681f3028fcde8416c92333ac5
Author: Florian Müllner <fmuellner gnome org>
Date:   Fri Sep 6 03:12:28 2013 +0200

    appDisplay: Increase fade offset in FolderView
    
    Just as we do in AllView, we set the offset of FolderViews' fade
    effect so that no icon is faded when a full page is visible.
    This works fine in AllView, however in the FolderView case where
    the popup's offsets eat away from the available fade height, the
    effect ends up being barely noticeable at all.
    While it is not ideal to apply the fade to the edge of a "full page",
    it looks less ugly than the current state, so pick the lesser evil ...
    
    https://bugzilla.gnome.org/show_bug.cgi?id=707662

 js/ui/appDisplay.js |   12 ++++++++----
 1 files changed, 8 insertions(+), 4 deletions(-)
---
diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js
index 948d99a..e0a4182 100644
--- a/js/ui/appDisplay.js
+++ b/js/ui/appDisplay.js
@@ -956,6 +956,14 @@ const FolderView = new Lang.Class({
 
         this._grid.adaptToSize(width, height);
 
+        // To avoid the fade effect being applied to the unscrolled grid,
+        // the offset would need to be applied after adjusting the padding;
+        // however the final padding is expected to be too small for the
+        // effect to look good, so use the unadjusted padding
+        let fadeOffset = Math.min(this._grid.topPadding,
+                                  this._grid.bottomPadding);
+        this.actor.update_fade_effect(fadeOffset, 0);
+
         // Set extra padding to avoid popup or close button being cut off
         this._grid.topPadding = Math.max(this._grid.topPadding - this._offsetForEachSide, 0);
         this._grid.bottomPadding = Math.max(this._grid.bottomPadding - this._offsetForEachSide, 0);
@@ -964,10 +972,6 @@ const FolderView = new Lang.Class({
 
         this.actor.set_width(this.usedWidth());
         this.actor.set_height(this.usedHeight());
-
-        let fadeOffset = Math.min(this._grid.topPadding,
-                                  this._grid.bottomPadding);
-        this.actor.update_fade_effect(fadeOffset, 0);
     },
 
     _getPageAvailableSize: function() {


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