From 387184b052f6969681f3028fcde8416c92333ac5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Fri, 6 Sep 2013 03:12:28 +0200 Subject: [PATCH] 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 file changed, 8 insertions(+), 4 deletions(-) diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js index 948d99a1d..e0a4182a1 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() {