Blame SOURCES/fix-thumbail-box-shrinking.patch

13bb5b
From 2446c4bdb9bcea36234108303c7bf33b3d238fa3 Mon Sep 17 00:00:00 2001
13bb5b
From: "Jasper St. Pierre" <jstpierre@mecheye.net>
13bb5b
Date: Mon, 25 Feb 2013 18:05:45 -0500
13bb5b
Subject: [PATCH 1/8] overview: Move the group construction to the controls
13bb5b
 manager
13bb5b
13bb5b
Instead of creating a bunch of random actors and then passing
13bb5b
them off to the controls manager, let the controls manager
13bb5b
construct them. This leaves the controls manager in charge
13bb5b
of the ordeal.
13bb5b
13bb5b
https://bugzilla.gnome.org/show_bug.cgi?id=694469
13bb5b
---
13bb5b
 js/ui/overview.js         | 37 ++++--------------------------
13bb5b
 js/ui/overviewControls.js | 58 ++++++++++++++++++++++++++++++++---------------
13bb5b
 2 files changed, 45 insertions(+), 50 deletions(-)
13bb5b
13bb5b
diff --git a/js/ui/overview.js b/js/ui/overview.js
13bb5b
index 02b23c7..ab4845c 100644
13bb5b
--- a/js/ui/overview.js
13bb5b
+++ b/js/ui/overview.js
13bb5b
@@ -11,7 +11,6 @@ const Shell = imports.gi.Shell;
13bb5b
 const Gdk = imports.gi.Gdk;
13bb5b
 
13bb5b
 const Background = imports.ui.background;
13bb5b
-const Dash = imports.ui.dash;
13bb5b
 const DND = imports.ui.dnd;
13bb5b
 const LayoutManager = imports.ui.layout;
13bb5b
 const Main = imports.ui.main;
13bb5b
@@ -20,8 +19,6 @@ const OverviewControls = imports.ui.overviewControls;
13bb5b
 const Panel = imports.ui.panel;
13bb5b
 const Params = imports.misc.params;
13bb5b
 const Tweener = imports.ui.tweener;
13bb5b
-const ViewSelector = imports.ui.viewSelector;
13bb5b
-const WorkspaceThumbnail = imports.ui.workspaceThumbnail;
13bb5b
 
13bb5b
 // Time for initial animation going into Overview mode
13bb5b
 const ANIMATION_TIME = 0.25;
13bb5b
@@ -133,14 +130,6 @@ const Overview = new Lang.Class({
13bb5b
                                             y_expand: true });
13bb5b
         this._overview._delegate = this;
13bb5b
 
13bb5b
-        this._groupStack = new St.Widget({ layout_manager: new Clutter.BinLayout(),
13bb5b
-                                           x_expand: true, y_expand: true,
13bb5b
-                                           clip_to_allocation: true });
13bb5b
-        this._group = new St.BoxLayout({ name: 'overview-group',
13bb5b
-                                         reactive: true,
13bb5b
-                                         x_expand: true, y_expand: true });
13bb5b
-        this._groupStack.add_actor(this._group);
13bb5b
-
13bb5b
         this._backgroundGroup = new Meta.BackgroundGroup();
13bb5b
         global.overlay_group.add_child(this._backgroundGroup);
13bb5b
         this._backgroundGroup.hide();
13bb5b
@@ -177,7 +166,6 @@ const Overview = new Lang.Class({
13bb5b
         Main.xdndHandler.connect('drag-end', Lang.bind(this, this._onDragEnd));
13bb5b
 
13bb5b
         global.screen.connect('restacked', Lang.bind(this, this._onRestacked));
13bb5b
-        this._group.connect('scroll-event', Lang.bind(this, this._onScrollEvent));
13bb5b
 
13bb5b
         this._windowSwitchTimeoutId = 0;
13bb5b
         this._windowSwitchTimestamp = 0;
13bb5b
@@ -276,28 +264,13 @@ const Overview = new Lang.Class({
13bb5b
         this._overview.add_actor(this._searchEntryBin);
13bb5b
 
13bb5b
         // Create controls
13bb5b
-        this._dash = new Dash.Dash();
13bb5b
-        this._viewSelector = new ViewSelector.ViewSelector(this._searchEntry,
13bb5b
-                                                           this._dash.showAppsButton);
13bb5b
-        this._thumbnailsBox = new WorkspaceThumbnail.ThumbnailsBox();
13bb5b
-        this._controls = new OverviewControls.ControlsManager(this._dash,
13bb5b
-                                                              this._thumbnailsBox,
13bb5b
-                                                              this._viewSelector);
13bb5b
-
13bb5b
-        this._controls.dashActor.x_align = Clutter.ActorAlign.START;
13bb5b
-        this._controls.dashActor.y_expand = true;
13bb5b
-
13bb5b
-        // Put the dash in a separate layer to allow content to be centered
13bb5b
-        this._groupStack.add_actor(this._controls.dashActor);
13bb5b
-
13bb5b
-        // Pack all the actors into the group
13bb5b
-        this._group.add_actor(this._controls.dashSpacer);
13bb5b
-        this._group.add(this._viewSelector.actor, { x_fill: true,
13bb5b
-                                                    expand: true });
13bb5b
-        this._group.add_actor(this._controls.thumbnailsActor);
13bb5b
+        this._controls = new OverviewControls.ControlsManager(this._searchEntry);
13bb5b
+        this._dash = this._controls.dash;
13bb5b
+        this._viewSelector = this._controls.viewSelector;
13bb5b
 
13bb5b
         // Add our same-line elements after the search entry
13bb5b
-        this._overview.add(this._groupStack, { y_fill: true, expand: true });
13bb5b
+        this._overview.add(this._controls.actor, { y_fill: true, expand: true });
13bb5b
+        this._controls.actor.connect('scroll-event', Lang.bind(this, this._onScrollEvent));
13bb5b
 
13bb5b
         this._stack.add_actor(this._controls.indicatorActor);
13bb5b
 
13bb5b
diff --git a/js/ui/overviewControls.js b/js/ui/overviewControls.js
13bb5b
index ba5c7a8..b3eb5d3 100644
13bb5b
--- a/js/ui/overviewControls.js
13bb5b
+++ b/js/ui/overviewControls.js
13bb5b
@@ -6,10 +6,12 @@ const Meta = imports.gi.Meta;
13bb5b
 const St = imports.gi.St;
13bb5b
 const Shell = imports.gi.Shell;
13bb5b
 
13bb5b
+const Dash = imports.ui.dash;
13bb5b
 const Main = imports.ui.main;
13bb5b
 const Params = imports.misc.params;
13bb5b
 const Tweener = imports.ui.tweener;
13bb5b
 const ViewSelector = imports.ui.viewSelector;
13bb5b
+const WorkspaceThumbnail = imports.ui.workspaceThumbnail;
13bb5b
 
13bb5b
 const SIDE_CONTROLS_ANIMATION_TIME = 0.16;
13bb5b
 
13bb5b
@@ -309,6 +311,10 @@ const DashSlider = new Lang.Class({
13bb5b
         // available allocation
13bb5b
         this._dash.actor.x_expand = true;
13bb5b
         this._dash.actor.y_expand = true;
13bb5b
+
13bb5b
+        this.actor.x_align = Clutter.ActorAlign.START;
13bb5b
+        this.actor.y_expand = true;
13bb5b
+
13bb5b
         this.actor.add_actor(this._dash.actor);
13bb5b
 
13bb5b
         this._dash.connect('icon-size-changed', Lang.bind(this, this.updateSlide));
13bb5b
@@ -479,36 +485,52 @@ const MessagesIndicator = new Lang.Class({
13bb5b
 const ControlsManager = new Lang.Class({
13bb5b
     Name: 'ControlsManager',
13bb5b
 
13bb5b
-    _init: function(dash, thumbnails, viewSelector) {
13bb5b
-        this._dashSlider = new DashSlider(dash);
13bb5b
-        this.dashActor = this._dashSlider.actor;
13bb5b
-        this.dashSpacer = new DashSpacer();
13bb5b
-        this.dashSpacer.setDashActor(this.dashActor);
13bb5b
+    _init: function(searchEntry) {
13bb5b
+        this.dash = new Dash.Dash();
13bb5b
+        this._dashSlider = new DashSlider(this.dash);
13bb5b
+        this._dashSpacer = new DashSpacer();
13bb5b
+        this._dashSpacer.setDashActor(this._dashSlider.actor);
13bb5b
+
13bb5b
+        this._thumbnailsBox = new WorkspaceThumbnail.ThumbnailsBox();
13bb5b
+        this._thumbnailsSlider = new ThumbnailsSlider(this._thumbnailsBox);
13bb5b
 
13bb5b
-        this._thumbnailsSlider = new ThumbnailsSlider(thumbnails);
13bb5b
-        this.thumbnailsActor = this._thumbnailsSlider.actor;
13bb5b
+        this.viewSelector = new ViewSelector.ViewSelector(searchEntry,
13bb5b
+                                                          this.dash.showAppsButton);
13bb5b
+        this.viewSelector.connect('page-changed', Lang.bind(this, this._setVisibility));
13bb5b
+        this.viewSelector.connect('page-empty', Lang.bind(this, this._onPageEmpty));
13bb5b
 
13bb5b
-        this._indicator = new MessagesIndicator(viewSelector);
13bb5b
+        this._indicator = new MessagesIndicator(this.viewSelector);
13bb5b
         this.indicatorActor = this._indicator.actor;
13bb5b
 
13bb5b
-        this._viewSelector = viewSelector;
13bb5b
-        this._viewSelector.connect('page-changed', Lang.bind(this, this._setVisibility));
13bb5b
-        this._viewSelector.connect('page-empty', Lang.bind(this, this._onPageEmpty));
13bb5b
+        this.actor = new St.Widget({ layout_manager: new Clutter.BinLayout(),
13bb5b
+                                     x_expand: true, y_expand: true,
13bb5b
+                                     clip_to_allocation: true });
13bb5b
+        this._group = new St.BoxLayout({ name: 'overview-group',
13bb5b
+                                        reactive: true,
13bb5b
+                                        x_expand: true, y_expand: true });
13bb5b
+        this.actor.add_actor(this._group);
13bb5b
+
13bb5b
+        this.actor.add_actor(this._dashSlider.actor);
13bb5b
+
13bb5b
+        this._group.add_actor(this._dashSpacer);
13bb5b
+        this._group.add(this.viewSelector.actor, { x_fill: true,
13bb5b
+                                                   expand: true });
13bb5b
+        this._group.add_actor(this._thumbnailsSlider.actor);
13bb5b
 
13bb5b
         Main.overview.connect('showing', Lang.bind(this, this._updateSpacerVisibility));
13bb5b
         Main.overview.connect('item-drag-begin', Lang.bind(this,
13bb5b
             function() {
13bb5b
-                let activePage = this._viewSelector.getActivePage();
13bb5b
+                let activePage = this.viewSelector.getActivePage();
13bb5b
                 if (activePage != ViewSelector.ViewPage.WINDOWS)
13bb5b
-                    this._viewSelector.fadeHalf();
13bb5b
+                    this.viewSelector.fadeHalf();
13bb5b
             }));
13bb5b
         Main.overview.connect('item-drag-end', Lang.bind(this,
13bb5b
             function() {
13bb5b
-                this._viewSelector.fadeIn();
13bb5b
+                this.viewSelector.fadeIn();
13bb5b
             }));
13bb5b
         Main.overview.connect('item-drag-cancelled', Lang.bind(this,
13bb5b
             function() {
13bb5b
-                this._viewSelector.fadeIn();
13bb5b
+                this.viewSelector.fadeIn();
13bb5b
             }));
13bb5b
     },
13bb5b
 
13bb5b
@@ -521,7 +543,7 @@ const ControlsManager = new Lang.Class({
13bb5b
             (Main.overview.animationInProgress && !Main.overview.visibleTarget))
13bb5b
             return;
13bb5b
 
13bb5b
-        let activePage = this._viewSelector.getActivePage();
13bb5b
+        let activePage = this.viewSelector.getActivePage();
13bb5b
         let dashVisible = (activePage == ViewSelector.ViewPage.WINDOWS ||
13bb5b
                            activePage == ViewSelector.ViewPage.APPS);
13bb5b
         let thumbnailsVisible = (activePage == ViewSelector.ViewPage.WINDOWS);
13bb5b
@@ -541,8 +563,8 @@ const ControlsManager = new Lang.Class({
13bb5b
         if (Main.overview.animationInProgress && !Main.overview.visibleTarget)
13bb5b
             return;
13bb5b
 
13bb5b
-        let activePage = this._viewSelector.getActivePage();
13bb5b
-        this.dashSpacer.visible = (activePage == ViewSelector.ViewPage.WINDOWS);
13bb5b
+        let activePage = this.viewSelector.getActivePage();
13bb5b
+        this._dashSpacer.visible = (activePage == ViewSelector.ViewPage.WINDOWS);
13bb5b
     },
13bb5b
 
13bb5b
     _onPageEmpty: function() {
13bb5b
-- 
13bb5b
2.1.0
13bb5b
13bb5b
13bb5b
From 83330f59c82da874ef381ad81e79c7796bb228d1 Mon Sep 17 00:00:00 2001
13bb5b
From: "Jasper St. Pierre" <jstpierre@mecheye.net>
13bb5b
Date: Wed, 18 Sep 2013 19:42:41 -0400
13bb5b
Subject: [PATCH 2/8] overviewControls: Correct the use of x2 in SlidingControl
13bb5b
13bb5b
The x2 here needs to be more than just the width; it needs to
13bb5b
be added onto the x1.
13bb5b
13bb5b
https://bugzilla.gnome.org/show_bug.cgi?id=694881
13bb5b
---
13bb5b
 js/ui/overviewControls.js | 9 +++++----
13bb5b
 1 file changed, 5 insertions(+), 4 deletions(-)
13bb5b
13bb5b
diff --git a/js/ui/overviewControls.js b/js/ui/overviewControls.js
13bb5b
index b3eb5d3..2b8977d 100644
13bb5b
--- a/js/ui/overviewControls.js
13bb5b
+++ b/js/ui/overviewControls.js
13bb5b
@@ -62,10 +62,11 @@ const SlideLayout = new Lang.Class({
13bb5b
         let translationX = (realDirection == SlideDirection.LEFT) ?
13bb5b
             (availWidth - natWidth) : (natWidth - availWidth);
13bb5b
 
13bb5b
-        let actorBox = new Clutter.ActorBox({ x1: translationX,
13bb5b
-                                              y1: 0,
13bb5b
-                                              x2: child.x_expand ? availWidth : natWidth,
13bb5b
-                                              y2: child.y_expand ? availHeight : natHeight });
13bb5b
+        let actorBox = new Clutter.ActorBox();
13bb5b
+        actorBox.x1 = translationX;
13bb5b
+        actorBox.x2 = actorBox.x1 + child.x_expand ? availWidth : natWidth;
13bb5b
+        actorBox.y1 = 0;
13bb5b
+        actorBox.y2 = actorBox.y1 + child.y_expand ? availHeight : natHeight;
13bb5b
 
13bb5b
         child.allocate(actorBox, flags);
13bb5b
     },
13bb5b
-- 
13bb5b
2.1.0
13bb5b
13bb5b
13bb5b
From d603fda86689db852ff204048a57805bcded5f1b Mon Sep 17 00:00:00 2001
13bb5b
From: "Jasper St. Pierre" <jstpierre@mecheye.net>
13bb5b
Date: Wed, 18 Sep 2013 19:48:22 -0400
13bb5b
Subject: [PATCH 3/8] overviewControls: Clarify some code with a comment
13bb5b
13bb5b
translationX is sort of a bad name, since it confuses with the
13bb5b
actor's translation, which is used for sliding without allocation.
13bb5b
13bb5b
https://bugzilla.gnome.org/show_bug.cgi?id=694881
13bb5b
---
13bb5b
 js/ui/overviewControls.js | 8 +++++---
13bb5b
 1 file changed, 5 insertions(+), 3 deletions(-)
13bb5b
13bb5b
diff --git a/js/ui/overviewControls.js b/js/ui/overviewControls.js
13bb5b
index 2b8977d..50a7f8b 100644
13bb5b
--- a/js/ui/overviewControls.js
13bb5b
+++ b/js/ui/overviewControls.js
13bb5b
@@ -58,12 +58,14 @@ const SlideLayout = new Lang.Class({
13bb5b
         let availWidth = Math.round(box.x2 - box.x1);
13bb5b
         let availHeight = Math.round(box.y2 - box.y1);
13bb5b
 
13bb5b
+        // Align the actor inside the clipped box, as the actor's alignment
13bb5b
+        // flags only determine what to do if the allocated box is bigger
13bb5b
+        // than the actor's box.
13bb5b
         let realDirection = getRtlSlideDirection(this._direction, child);
13bb5b
-        let translationX = (realDirection == SlideDirection.LEFT) ?
13bb5b
-            (availWidth - natWidth) : (natWidth - availWidth);
13bb5b
+        let alignX = (realDirection == SlideDirection.LEFT) ? (availWidth - natWidth) : (natWidth - availWidth);
13bb5b
 
13bb5b
         let actorBox = new Clutter.ActorBox();
13bb5b
-        actorBox.x1 = translationX;
13bb5b
+        actorBox.x1 = alignX;
13bb5b
         actorBox.x2 = actorBox.x1 + child.x_expand ? availWidth : natWidth;
13bb5b
         actorBox.y1 = 0;
13bb5b
         actorBox.y2 = actorBox.y1 + child.y_expand ? availHeight : natHeight;
13bb5b
-- 
13bb5b
2.1.0
13bb5b
13bb5b
13bb5b
From b311522ecc172e1ca7f46cf46492b6fd7f847e23 Mon Sep 17 00:00:00 2001
13bb5b
From: "Jasper St. Pierre" <jstpierre@mecheye.net>
13bb5b
Date: Wed, 18 Sep 2013 19:48:51 -0400
13bb5b
Subject: [PATCH 4/8] overviewControls: Don't try to align something sliding to
13bb5b
 the right
13bb5b
13bb5b
0 is already the correct value.
13bb5b
13bb5b
https://bugzilla.gnome.org/show_bug.cgi?id=694881
13bb5b
---
13bb5b
 js/ui/overviewControls.js | 2 +-
13bb5b
 1 file changed, 1 insertion(+), 1 deletion(-)
13bb5b
13bb5b
diff --git a/js/ui/overviewControls.js b/js/ui/overviewControls.js
13bb5b
index 50a7f8b..0841715 100644
13bb5b
--- a/js/ui/overviewControls.js
13bb5b
+++ b/js/ui/overviewControls.js
13bb5b
@@ -62,7 +62,7 @@ const SlideLayout = new Lang.Class({
13bb5b
         // flags only determine what to do if the allocated box is bigger
13bb5b
         // than the actor's box.
13bb5b
         let realDirection = getRtlSlideDirection(this._direction, child);
13bb5b
-        let alignX = (realDirection == SlideDirection.LEFT) ? (availWidth - natWidth) : (natWidth - availWidth);
13bb5b
+        let alignX = (realDirection == SlideDirection.LEFT) ? (availWidth - natWidth) : 0;
13bb5b
 
13bb5b
         let actorBox = new Clutter.ActorBox();
13bb5b
         actorBox.x1 = alignX;
13bb5b
-- 
13bb5b
2.1.0
13bb5b
13bb5b
13bb5b
From 38a92b4a0dc60f475c30e00ae9987e1e320950d0 Mon Sep 17 00:00:00 2001
13bb5b
From: "Jasper St. Pierre" <jstpierre@mecheye.net>
13bb5b
Date: Fri, 11 Oct 2013 22:36:49 -0400
13bb5b
Subject: [PATCH 5/8] overviewControls: Don't use the child's preferred size to
13bb5b
 slide from
13bb5b
13bb5b
In order for the workspace thumbnails box to have the correct size,
13bb5b
we need to constrain the width of the thumbnails box to the height we're
13bb5b
given, instead of assuming an unlimited height.
13bb5b
13bb5b
https://bugzilla.gnome.org/show_bug.cgi?id=694881
13bb5b
---
13bb5b
 js/ui/overviewControls.js | 10 ++--------
13bb5b
 1 file changed, 2 insertions(+), 8 deletions(-)
13bb5b
13bb5b
diff --git a/js/ui/overviewControls.js b/js/ui/overviewControls.js
13bb5b
index 0841715..aafb905 100644
13bb5b
--- a/js/ui/overviewControls.js
13bb5b
+++ b/js/ui/overviewControls.js
13bb5b
@@ -54,9 +54,9 @@ const SlideLayout = new Lang.Class({
13bb5b
     vfunc_allocate: function(container, box, flags) {
13bb5b
         let child = container.get_first_child();
13bb5b
 
13bb5b
-        let [, , natWidth, natHeight] = child.get_preferred_size();
13bb5b
         let availWidth = Math.round(box.x2 - box.x1);
13bb5b
         let availHeight = Math.round(box.y2 - box.y1);
13bb5b
+        let [, natWidth] = child.get_preferred_width(availHeight);
13bb5b
 
13bb5b
         // Align the actor inside the clipped box, as the actor's alignment
13bb5b
         // flags only determine what to do if the allocated box is bigger
13bb5b
@@ -68,7 +68,7 @@ const SlideLayout = new Lang.Class({
13bb5b
         actorBox.x1 = alignX;
13bb5b
         actorBox.x2 = actorBox.x1 + child.x_expand ? availWidth : natWidth;
13bb5b
         actorBox.y1 = 0;
13bb5b
-        actorBox.y2 = actorBox.y1 + child.y_expand ? availHeight : natHeight;
13bb5b
+        actorBox.y2 = actorBox.y1 + availHeight;
13bb5b
 
13bb5b
         child.allocate(actorBox, flags);
13bb5b
     },
13bb5b
@@ -237,11 +237,6 @@ const ThumbnailsSlider = new Lang.Class({
13bb5b
 
13bb5b
         this._thumbnailsBox = thumbnailsBox;
13bb5b
 
13bb5b
-        // SlideLayout reads the actor's expand flags to decide
13bb5b
-        // whether to allocate the natural size to its child, or the whole
13bb5b
-        // available allocation
13bb5b
-        this._thumbnailsBox.actor.y_expand = true;
13bb5b
-
13bb5b
         this.actor.request_mode = Clutter.RequestMode.WIDTH_FOR_HEIGHT;
13bb5b
         this.actor.reactive = true;
13bb5b
         this.actor.track_hover = true;
13bb5b
@@ -313,7 +308,6 @@ const DashSlider = new Lang.Class({
13bb5b
         // whether to allocate the natural size to its child, or the whole
13bb5b
         // available allocation
13bb5b
         this._dash.actor.x_expand = true;
13bb5b
-        this._dash.actor.y_expand = true;
13bb5b
 
13bb5b
         this.actor.x_align = Clutter.ActorAlign.START;
13bb5b
         this.actor.y_expand = true;
13bb5b
-- 
13bb5b
2.1.0
13bb5b
13bb5b
13bb5b
From 9bc20a14840beaa4c308a11000e2a6b737f5c208 Mon Sep 17 00:00:00 2001
13bb5b
From: "Jasper St. Pierre" <jstpierre@mecheye.net>
13bb5b
Date: Fri, 11 Oct 2013 21:27:59 -0400
13bb5b
Subject: [PATCH 6/8] workspaceThumbnail: Drop the _background hack
13bb5b
13bb5b
The _background hack was added because the old way the zooming animation
13bb5b
worked, it set the allocation of the workspaces view and thumbnails box
13bb5b
to the final position and used animations to smoothly animate.
13bb5b
13bb5b
During the 3.6 cycle when we added the new search view, Cosimo changed the
13bb5b
way the zoom animation works so that rather than set the final allocation
13bb5b
and animate, we actually do adjust the allocation of the workspaces view
13bb5b
and thumbnails box.
13bb5b
13bb5b
So, as the hack is no longer necessary, we can drop it.
13bb5b
13bb5b
https://bugzilla.gnome.org/show_bug.cgi?id=694881
13bb5b
---
13bb5b
 data/theme/gnome-shell.css  | 11 +++----
13bb5b
 js/ui/workspaceThumbnail.js | 77 +++++++++++++--------------------------------
13bb5b
 2 files changed, 25 insertions(+), 63 deletions(-)
13bb5b
13bb5b
diff --git a/data/theme/gnome-shell.css b/data/theme/gnome-shell.css
13bb5b
index 532c8a5..80c929e 100644
13bb5b
--- a/data/theme/gnome-shell.css
13bb5b
+++ b/data/theme/gnome-shell.css
13bb5b
@@ -673,7 +673,9 @@ StScrollBar StButton#vhandle:active {
13bb5b
     padding-bottom: 32px;
13bb5b
 }
13bb5b
 
13bb5b
-.workspace-thumbnails-background {
13bb5b
+.workspace-thumbnails {
13bb5b
+    spacing: 11px;
13bb5b
+    visible-width: 32px; /* Amount visible before hovering */
13bb5b
     border: 1px solid rgba(128, 128, 128, 0.4);
13bb5b
     border-right: 0px;
13bb5b
     border-radius: 9px 0px 0px 9px;
13bb5b
@@ -681,18 +683,13 @@ StScrollBar StButton#vhandle:active {
13bb5b
     padding: 11px 7px 11px 11px;
13bb5b
 }
13bb5b
 
13bb5b
-.workspace-thumbnails-background:rtl {
13bb5b
+.workspace-thumbnails:rtl {
13bb5b
     border-right: 1px;
13bb5b
     border-left: 0px;
13bb5b
     border-radius: 0px 9px 9px 0px;
13bb5b
     padding: 11px 11px 11px 7px;
13bb5b
 }
13bb5b
 
13bb5b
-.workspace-thumbnails {
13bb5b
-    spacing: 11px;
13bb5b
-    visible-width: 32px; /* Amount visible before hovering */
13bb5b
-}
13bb5b
-
13bb5b
 .workspace-thumbnail-indicator {
13bb5b
     border: 4px solid rgba(255,255,255,0.7);
13bb5b
     border-radius: 4px;
13bb5b
diff --git a/js/ui/workspaceThumbnail.js b/js/ui/workspaceThumbnail.js
13bb5b
index 6b631d1..d4374f2 100644
13bb5b
--- a/js/ui/workspaceThumbnail.js
13bb5b
+++ b/js/ui/workspaceThumbnail.js
13bb5b
@@ -536,20 +536,6 @@ const ThumbnailsBox = new Lang.Class({
13bb5b
         this.actor.connect('allocate', Lang.bind(this, this._allocate));
13bb5b
         this.actor._delegate = this;
13bb5b
 
13bb5b
-        // When we animate the scale, we don't animate the requested size of the thumbnails, rather
13bb5b
-        // we ask for our final size and then animate within that size. This slightly simplifies the
13bb5b
-        // interaction with the main workspace windows (instead of constantly reallocating them
13bb5b
-        // to a new size, they get a new size once, then use the standard window animation code
13bb5b
-        // allocate the windows to their new positions), however it causes problems for drawing
13bb5b
-        // the background and border wrapped around the thumbnail as we animate - we can't just pack
13bb5b
-        // the container into a box and set style properties on the box since that box would wrap
13bb5b
-        // around the final size not the animating size. So instead we fake the background with
13bb5b
-        // an actor underneath the content and adjust the allocation of our children to leave space
13bb5b
-        // for the border and padding of the background actor.
13bb5b
-        this._background = new St.Bin({ style_class: 'workspace-thumbnails-background' });
13bb5b
-
13bb5b
-        this.actor.add_actor(this._background);
13bb5b
-
13bb5b
         let indicator = new St.Bin({ style_class: 'workspace-thumbnail-indicator' });
13bb5b
 
13bb5b
         // We don't want the indicator to affect drag-and-drop
13bb5b
@@ -1038,9 +1024,6 @@ const ThumbnailsBox = new Lang.Class({
13bb5b
     },
13bb5b
 
13bb5b
     _getPreferredHeight: function(actor, forWidth, alloc) {
13bb5b
-        // See comment about this._background in _init()
13bb5b
-        let themeNode = this._background.get_theme_node();
13bb5b
-
13bb5b
         // Note that for getPreferredWidth/Height we cheat a bit and skip propagating
13bb5b
         // the size request to our children because we know how big they are and know
13bb5b
         // that the actors aren't depending on the virtual functions being called.
13bb5b
@@ -1048,24 +1031,21 @@ const ThumbnailsBox = new Lang.Class({
13bb5b
         if (this._thumbnails.length == 0)
13bb5b
             return;
13bb5b
 
13bb5b
-        let spacing = this.actor.get_theme_node().get_length('spacing');
13bb5b
+        let themeNode = this.actor.get_theme_node();
13bb5b
+
13bb5b
+        let spacing = themeNode.get_length('spacing');
13bb5b
         let nWorkspaces = global.screen.n_workspaces;
13bb5b
         let totalSpacing = (nWorkspaces - 1) * spacing;
13bb5b
 
13bb5b
-        [alloc.min_size, alloc.natural_size] =
13bb5b
-            themeNode.adjust_preferred_height(totalSpacing,
13bb5b
-                                              totalSpacing + nWorkspaces * this._porthole.height * MAX_THUMBNAIL_SCALE);
13bb5b
+        alloc.min_size = totalSpacing;
13bb5b
+        alloc.natural_size = totalSpacing + nWorkspaces * this._porthole.height * MAX_THUMBNAIL_SCALE;
13bb5b
     },
13bb5b
 
13bb5b
     _getPreferredWidth: function(actor, forHeight, alloc) {
13bb5b
-        // See comment about this._background in _init()
13bb5b
-        let themeNode = this._background.get_theme_node();
13bb5b
-
13bb5b
         if (this._thumbnails.length == 0)
13bb5b
             return;
13bb5b
 
13bb5b
-        // We don't animate our preferred width, which is always reported according
13bb5b
-        // to the actual number of current workspaces, we just animate within that
13bb5b
+        let themeNode = this.actor.get_theme_node();
13bb5b
 
13bb5b
         let spacing = this.actor.get_theme_node().get_length('spacing');
13bb5b
         let nWorkspaces = global.screen.n_workspaces;
13bb5b
@@ -1077,28 +1057,26 @@ const ThumbnailsBox = new Lang.Class({
13bb5b
         scale = Math.min(scale, MAX_THUMBNAIL_SCALE);
13bb5b
 
13bb5b
         let width = Math.round(this._porthole.width * scale);
13bb5b
-        [alloc.min_size, alloc.natural_size] =
13bb5b
-            themeNode.adjust_preferred_width(width, width);
13bb5b
+        alloc.min_size = width;
13bb5b
+        alloc.natural_size = width;
13bb5b
     },
13bb5b
 
13bb5b
     _allocate: function(actor, box, flags) {
13bb5b
         let rtl = (Clutter.get_default_text_direction () == Clutter.TextDirection.RTL);
13bb5b
 
13bb5b
-        // See comment about this._background in _init()
13bb5b
-        let themeNode = this._background.get_theme_node();
13bb5b
-        let contentBox = themeNode.get_content_box(box);
13bb5b
-
13bb5b
         if (this._thumbnails.length == 0) // not visible
13bb5b
             return;
13bb5b
 
13bb5b
+        let themeNode = this.actor.get_theme_node();
13bb5b
+
13bb5b
         let portholeWidth = this._porthole.width;
13bb5b
         let portholeHeight = this._porthole.height;
13bb5b
-        let spacing = this.actor.get_theme_node().get_length('spacing');
13bb5b
+        let spacing = themeNode.get_length('spacing');
13bb5b
 
13bb5b
         // Compute the scale we'll need once everything is updated
13bb5b
         let nWorkspaces = global.screen.n_workspaces;
13bb5b
         let totalSpacing = (nWorkspaces - 1) * spacing;
13bb5b
-        let avail = (contentBox.y2 - contentBox.y1) - totalSpacing;
13bb5b
+        let avail = (box.y2 - box.y1) - totalSpacing;
13bb5b
 
13bb5b
         let newScale = (avail / nWorkspaces) / portholeHeight;
13bb5b
         newScale = Math.min(newScale, MAX_THUMBNAIL_SCALE);
13bb5b
@@ -1127,21 +1105,6 @@ const ThumbnailsBox = new Lang.Class({
13bb5b
         else
13bb5b
             slideOffset = thumbnailWidth + themeNode.get_padding(St.Side.RIGHT);
13bb5b
 
13bb5b
-        let childBox = new Clutter.ActorBox();
13bb5b
-
13bb5b
-        // The background is horizontally restricted to correspond to the current thumbnail size
13bb5b
-        // but otherwise covers the entire allocation
13bb5b
-        if (rtl) {
13bb5b
-            childBox.x1 = box.x1;
13bb5b
-            childBox.x2 = box.x2 - ((contentBox.x2 - contentBox.x1) - thumbnailWidth);
13bb5b
-        } else {
13bb5b
-            childBox.x1 = box.x1 + ((contentBox.x2 - contentBox.x1) - thumbnailWidth);
13bb5b
-            childBox.x2 = box.x2;
13bb5b
-        }
13bb5b
-        childBox.y1 = box.y1;
13bb5b
-        childBox.y2 = box.y2;
13bb5b
-        this._background.allocate(childBox, flags);
13bb5b
-
13bb5b
         let indicatorY1 = this._indicatorY;
13bb5b
         let indicatorY2;
13bb5b
         // when not animating, the workspace position overrides this._indicatorY
13bb5b
@@ -1153,7 +1116,7 @@ const ThumbnailsBox = new Lang.Class({
13bb5b
         let indicatorLeftFullBorder = indicatorThemeNode.get_padding(St.Side.LEFT) + indicatorThemeNode.get_border_width(St.Side.LEFT);
13bb5b
         let indicatorRightFullBorder = indicatorThemeNode.get_padding(St.Side.RIGHT) + indicatorThemeNode.get_border_width(St.Side.RIGHT);
13bb5b
 
13bb5b
-        let y = contentBox.y1;
13bb5b
+        let y = box.y1;
13bb5b
 
13bb5b
         if (this._dropPlaceholderPos == -1) {
13bb5b
             Meta.later_add(Meta.LaterType.BEFORE_REDRAW, Lang.bind(this, function() {
13bb5b
@@ -1161,6 +1124,8 @@ const ThumbnailsBox = new Lang.Class({
13bb5b
             }));
13bb5b
         }
13bb5b
 
13bb5b
+        let childBox = new Clutter.ActorBox();
13bb5b
+
13bb5b
         for (let i = 0; i < this._thumbnails.length; i++) {
13bb5b
             let thumbnail = this._thumbnails[i];
13bb5b
 
13bb5b
@@ -1169,10 +1134,10 @@ const ThumbnailsBox = new Lang.Class({
13bb5b
 
13bb5b
             let x1, x2;
13bb5b
             if (rtl) {
13bb5b
-                x1 = contentBox.x1 + slideOffset * thumbnail.slidePosition;
13bb5b
+                x1 = box.x1 + slideOffset * thumbnail.slidePosition;
13bb5b
                 x2 = x1 + thumbnailWidth;
13bb5b
             } else {
13bb5b
-                x1 = contentBox.x2 - thumbnailWidth + slideOffset * thumbnail.slidePosition;
13bb5b
+                x1 = box.x2 - thumbnailWidth + slideOffset * thumbnail.slidePosition;
13bb5b
                 x2 = x1 + thumbnailWidth;
13bb5b
             }
13bb5b
 
13bb5b
@@ -1219,11 +1184,11 @@ const ThumbnailsBox = new Lang.Class({
13bb5b
         }
13bb5b
 
13bb5b
         if (rtl) {
13bb5b
-            childBox.x1 = contentBox.x1;
13bb5b
-            childBox.x2 = contentBox.x1 + thumbnailWidth;
13bb5b
+            childBox.x1 = box.x1;
13bb5b
+            childBox.x2 = box.x1 + thumbnailWidth;
13bb5b
         } else {
13bb5b
-            childBox.x1 = contentBox.x2 - thumbnailWidth;
13bb5b
-            childBox.x2 = contentBox.x2;
13bb5b
+            childBox.x1 = box.x2 - thumbnailWidth;
13bb5b
+            childBox.x2 = box.x2;
13bb5b
         }
13bb5b
         childBox.x1 -= indicatorLeftFullBorder;
13bb5b
         childBox.x2 += indicatorRightFullBorder;
13bb5b
-- 
13bb5b
2.1.0
13bb5b
13bb5b
13bb5b
From a391e6dd3ed64517fefeaf5876fa5c838e1eb58f Mon Sep 17 00:00:00 2001
13bb5b
From: =?UTF-8?q?Florian=20M=C3=BCllner?= <fmuellner@gnome.org>
13bb5b
Date: Thu, 9 Oct 2014 14:07:22 +0200
13bb5b
Subject: [PATCH 7/8] overviewControls: Fix thinko in SlideLayout
13bb5b
13bb5b
Controls that slide left are located on the left, so the offset to
13bb5b
align them with the corresponding edge is always 0. It's controls
13bb5b
on the right that need a different offset when the available width
13bb5b
exceeds the child's width.
13bb5b
13bb5b
https://bugzilla.gnome.org/show_bug.cgi?id=728899
13bb5b
---
13bb5b
 js/ui/overviewControls.js | 2 +-
13bb5b
 1 file changed, 1 insertion(+), 1 deletion(-)
13bb5b
13bb5b
diff --git a/js/ui/overviewControls.js b/js/ui/overviewControls.js
13bb5b
index aafb905..1d1c550 100644
13bb5b
--- a/js/ui/overviewControls.js
13bb5b
+++ b/js/ui/overviewControls.js
13bb5b
@@ -62,7 +62,7 @@ const SlideLayout = new Lang.Class({
13bb5b
         // flags only determine what to do if the allocated box is bigger
13bb5b
         // than the actor's box.
13bb5b
         let realDirection = getRtlSlideDirection(this._direction, child);
13bb5b
-        let alignX = (realDirection == SlideDirection.LEFT) ? (availWidth - natWidth) : 0;
13bb5b
+        let alignX = (realDirection == SlideDirection.RIGHT) ? (availWidth - natWidth) : 0;
13bb5b
 
13bb5b
         let actorBox = new Clutter.ActorBox();
13bb5b
         actorBox.x1 = alignX;
13bb5b
-- 
13bb5b
2.1.0
13bb5b
13bb5b
13bb5b
From ae265eb3f7d1b8c4f480e61bbc8d3a01dbed34db Mon Sep 17 00:00:00 2001
13bb5b
From: =?UTF-8?q?Florian=20M=C3=BCllner?= <fmuellner@gnome.org>
13bb5b
Date: Fri, 10 Oct 2014 10:58:42 +0200
13bb5b
Subject: [PATCH 8/8] overviewControls: Really fix x align
13bb5b
13bb5b
Commit a4475465f1f2 fixed the wrong alignment for the fully visible
13bb5b
control, but regressed the partially slid-out one; take the slideX
13bb5b
factor into account to get the right offset for both cases.
13bb5b
---
13bb5b
 js/ui/overviewControls.js | 3 ++-
13bb5b
 1 file changed, 2 insertions(+), 1 deletion(-)
13bb5b
13bb5b
diff --git a/js/ui/overviewControls.js b/js/ui/overviewControls.js
13bb5b
index 1d1c550..4f5bb7f 100644
13bb5b
--- a/js/ui/overviewControls.js
13bb5b
+++ b/js/ui/overviewControls.js
13bb5b
@@ -62,7 +62,8 @@ const SlideLayout = new Lang.Class({
13bb5b
         // flags only determine what to do if the allocated box is bigger
13bb5b
         // than the actor's box.
13bb5b
         let realDirection = getRtlSlideDirection(this._direction, child);
13bb5b
-        let alignX = (realDirection == SlideDirection.RIGHT) ? (availWidth - natWidth) : 0;
13bb5b
+        let alignX = (realDirection == SlideDirection.LEFT) ? (availWidth - natWidth)
13bb5b
+                                                            : (availWidth - natWidth * this._slideX);
13bb5b
 
13bb5b
         let actorBox = new Clutter.ActorBox();
13bb5b
         actorBox.x1 = alignX;
13bb5b
-- 
13bb5b
2.1.0
13bb5b