overviewControls: Correct the use of x2 in SlidingControl

The x2 here needs to be more than just the width; it needs to
be added onto the x1.

https://bugzilla.gnome.org/show_bug.cgi?id=694881
This commit is contained in:
Jasper St. Pierre 2013-09-18 19:42:41 -04:00
parent e216addf7c
commit 40cd92f701

View File

@ -63,10 +63,11 @@ const SlideLayout = new Lang.Class({
let translationX = (realDirection == SlideDirection.LEFT) ?
(availWidth - natWidth) : (natWidth - availWidth);
let actorBox = new Clutter.ActorBox({ x1: translationX,
y1: 0,
x2: child.x_expand ? availWidth : natWidth,
y2: child.y_expand ? availHeight : natHeight });
let actorBox = new Clutter.ActorBox();
actorBox.x1 = translationX;
actorBox.x2 = actorBox.x1 + child.x_expand ? availWidth : natWidth;
actorBox.y1 = 0;
actorBox.y2 = actorBox.y1 + child.y_expand ? availHeight : natHeight;
child.allocate(actorBox, flags);
},