[gnome-shell/wip/rewindow: 7/10] workspacesView: Add some spacing between the workspaces and thumbs
- From: Jasper St. Pierre <jstpierre src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell/wip/rewindow: 7/10] workspacesView: Add some spacing between the workspaces and thumbs
- Date: Mon, 20 Aug 2012 08:31:16 +0000 (UTC)
commit 85dc449b4656dac6be08e34fbfb306b313a1c45a
Author: Jasper St. Pierre <jstpierre mecheye net>
Date: Wed Aug 8 17:21:19 2012 -0300
workspacesView: Add some spacing between the workspaces and thumbs
Make it the same padding as between the overview and dash, too.
https://bugzilla.gnome.org/show_bug.cgi?id=582650
data/theme/gnome-shell.css | 2 +-
js/ui/overview.js | 16 +++++++++-------
js/ui/workspacesView.js | 14 +++++---------
3 files changed, 15 insertions(+), 17 deletions(-)
---
diff --git a/data/theme/gnome-shell.css b/data/theme/gnome-shell.css
index 23416e1..21dd1b6 100644
--- a/data/theme/gnome-shell.css
+++ b/data/theme/gnome-shell.css
@@ -562,7 +562,7 @@ StButton.popup-menu-item:insensitive {
/* Overview */
#overview {
- spacing: 12px;
+ spacing: 40px;
}
.window-caption {
diff --git a/js/ui/overview.js b/js/ui/overview.js
index 925b2e6..00e410f 100644
--- a/js/ui/overview.js
+++ b/js/ui/overview.js
@@ -121,7 +121,7 @@ const Overview = new Lang.Class({
this._desktopFade = new St.Bin();
global.overlay_group.add_actor(this._desktopFade);
- this._spacing = 0;
+ this.spacing = 0;
/* Translators: This is the main view to select
activities. See also note for "Activities" string. */
@@ -133,8 +133,8 @@ const Overview = new Lang.Class({
Lang.bind(this, function() {
let node = this._group.get_theme_node();
let spacing = node.get_length('spacing');
- if (spacing != this._spacing) {
- this._spacing = spacing;
+ if (spacing != this.spacing) {
+ this.spacing = spacing;
this._relayout();
}
}));
@@ -501,10 +501,10 @@ const Overview = new Lang.Class({
this._coverPane.set_size(primary.width, contentHeight);
let dashWidth = Math.round(DASH_SPLIT_FRACTION * primary.width);
- let viewWidth = primary.width - dashWidth - this._spacing;
- let viewHeight = contentHeight - 2 * this._spacing;
- let viewY = contentY + this._spacing;
- let viewX = rtl ? 0 : dashWidth + this._spacing;
+ let viewWidth = primary.width - dashWidth - this.spacing;
+ let viewHeight = contentHeight - 2 * this.spacing;
+ let viewY = contentY + this.spacing;
+ let viewX = rtl ? 0 : dashWidth + this.spacing;
// Set the dash's x position - y is handled by a constraint
let dashX;
@@ -518,6 +518,8 @@ const Overview = new Lang.Class({
this._viewSelector.actor.set_position(viewX, viewY);
this._viewSelector.actor.set_size(viewWidth, viewHeight);
+
+ this._workspacesDisplay.actor.queue_relayout();
},
//// Public methods ////
diff --git a/js/ui/workspacesView.js b/js/ui/workspacesView.js
index 7d907c6..7314e41 100644
--- a/js/ui/workspacesView.js
+++ b/js/ui/workspacesView.js
@@ -869,15 +869,11 @@ const WorkspacesDisplay = new Lang.Class({
let clipX = rtl ? x + controlsVisible : x;
let clipY = y + (fullHeight - clipHeight) / 2;
- if (this._zoomOut) {
- width -= controlsNatural;
- if (rtl)
- x += controlsNatural;
- } else {
- width -= controlsVisible;
- if (rtl)
- x += controlsVisible;
- }
+ let widthAdjust = this._zoomOut ? controlsNatural : controlsVisible;
+ widthAdjust += Main.overview.spacing;
+ width -= widthAdjust;
+ if (rtl)
+ x += widthAdjust;
let monitors = Main.layoutManager.monitors;
let m = 0;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]