[gnome-shell-extensions] window-list: Expand workspace button for Fitts'ability
- From: Florian Müllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell-extensions] window-list: Expand workspace button for Fitts'ability
- Date: Wed, 3 Sep 2014 13:16:21 +0000 (UTC)
commit 5616a6deaeebed7faa49d9bb45abf6a67674a4c0
Author: Florian Müllner <fmuellner gnome org>
Date: Thu May 29 01:09:58 2014 +0200
window-list: Expand workspace button for Fitts'ability
The workspace button used to extend to the bottom edge, which of
course is A Good Thing (tm) - commit ec8f2691071f broke this when
it added an additional container to the hierarchy, expand the
button again to bring back the old mouse-friendly behavior.
https://bugzilla.gnome.org/show_bug.cgi?id=708247
extensions/window-list/extension.js | 18 ++++++++++++++----
extensions/window-list/stylesheet.css | 10 +++++-----
2 files changed, 19 insertions(+), 9 deletions(-)
---
diff --git a/extensions/window-list/extension.js b/extensions/window-list/extension.js
index e77dde9..82f48f5 100644
--- a/extensions/window-list/extension.js
+++ b/extensions/window-list/extension.js
@@ -644,10 +644,15 @@ const WorkspaceIndicator = new Lang.Class({
this.parent(0.0, _("Workspace Indicator"));
this.actor.add_style_class_name('window-list-workspace-indicator');
- this._currentWorkspace = global.screen.get_active_workspace().index();
- this.statusLabel = new St.Label({ text: this._getStatusText() });
+ let container = new St.Widget({ layout_manager: new Clutter.BinLayout(),
+ x_expand: true, y_expand: true });
+ this.actor.add_actor(container);
- this.actor.add_actor(this.statusLabel);
+ this._currentWorkspace = global.screen.get_active_workspace().index();
+ this.statusLabel = new St.Label({ text: this._getStatusText(),
+ x_align: Clutter.ActorAlign.CENTER,
+ y_align: Clutter.ActorAlign.CENTER });
+ container.add_actor(this.statusLabel);
this.workspacesItems = [];
@@ -734,6 +739,11 @@ const WorkspaceIndicator = new Lang.Class({
let newIndex = this._currentWorkspace + diff;
this._activate(newIndex);
},
+
+ _allocate: function(actor, box, flags) {
+ if (actor.get_n_children() > 0)
+ actor.get_first_child().allocate(box, flags);
+ }
});
const WindowList = new Lang.Class({
@@ -785,7 +795,7 @@ const WindowList = new Lang.Class({
box.add(indicatorsBox);
this._workspaceIndicator = new WorkspaceIndicator();
- indicatorsBox.add(this._workspaceIndicator.container, { expand: false, y_fill: false });
+ indicatorsBox.add(this._workspaceIndicator.container, { expand: false, y_fill: true });
this._menuManager = new PopupMenu.PopupMenuManager(this);
this._menuManager.addMenu(this._workspaceIndicator.menu);
diff --git a/extensions/window-list/stylesheet.css b/extensions/window-list/stylesheet.css
index 3ce4115..5bb7f35 100644
--- a/extensions/window-list/stylesheet.css
+++ b/extensions/window-list/stylesheet.css
@@ -68,14 +68,14 @@
}
.window-list-workspace-indicator {
- background-color: rgba(200, 200, 200, .3);
- border: 1px solid #cccccc;
+ padding: 3px;
}
-.window-list-workspace-indicator > StLabel {
- padding: 0 2px;
+.window-list-workspace-indicator > StWidget {
+ background-color: rgba(200, 200, 200, .3);
+ border: 1px solid #cccccc;
}
.notification {
font-weight: normal;
-}
\ No newline at end of file
+}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]