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) ? let translationX = (realDirection == SlideDirection.LEFT) ?
(availWidth - natWidth) : (natWidth - availWidth); (availWidth - natWidth) : (natWidth - availWidth);
let actorBox = new Clutter.ActorBox({ x1: translationX, let actorBox = new Clutter.ActorBox();
y1: 0, actorBox.x1 = translationX;
x2: child.x_expand ? availWidth : natWidth, actorBox.x2 = actorBox.x1 + child.x_expand ? availWidth : natWidth;
y2: child.y_expand ? availHeight : natHeight }); actorBox.y1 = 0;
actorBox.y2 = actorBox.y1 + child.y_expand ? availHeight : natHeight;
child.allocate(actorBox, flags); child.allocate(actorBox, flags);
}, },