appDisplay: Make sure we don't clip folder view

If we round up the value, we make sure we don't clip in any
case neither the folder view or the close button.
This commit is contained in:
Carlos Soriano 2013-09-06 23:31:03 +02:00
parent 08f95264d6
commit 6b554337ff

View File

@ -1072,9 +1072,9 @@ const FolderIcon = new Lang.Class({
// StWidget delays style calculation until needed, make sure we use the correct values
this.view._grid.actor.ensure_style();
let offsetForEachSide = (this._popup.getOffset(St.Side.TOP) +
this._popup.getOffset(St.Side.BOTTOM) -
this._popup.getCloseButtonOverlap()) / 2;
let offsetForEachSide = Math.ceil((this._popup.getOffset(St.Side.TOP) +
this._popup.getOffset(St.Side.BOTTOM) -
this._popup.getCloseButtonOverlap()) / 2);
// Add extra padding to prevent boxpointer decorations and close button being cut off
this.view.setPaddingOffsets(offsetForEachSide);
this.view.adaptToSize(this._parentAvailableWidth, this._parentAvailableHeight);