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
This commit is contained in:
Florian Müllner 2013-09-06 03:12:28 +02:00
parent beec47d7ad
commit 387184b052

View File

@ -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() {