Blob Blame History Raw
From 2a30c690fc53987a623141c8ba6b86c82fc1be0c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Florian=20M=C3=BCllner?= <fmuellner@gnome.org>
Date: Fri, 12 Jun 2015 20:23:00 +0200
Subject: [PATCH 1/4] window-list: Expand window buttons vertically

The window-list's fixed height currently allows us to get away without
expanding buttons, however this won't be the case anymore once we start
adapting the list with the text scaling. So fix up the code to do what
was always the intention anyway.

https://bugzilla.gnome.org/show_bug.cgi?id=703585
---
 extensions/window-list/extension.js | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)

diff --git a/extensions/window-list/extension.js b/extensions/window-list/extension.js
index b22f8bf..5ceccc1 100644
--- a/extensions/window-list/extension.js
+++ b/extensions/window-list/extension.js
@@ -140,11 +140,12 @@ const WindowTitle = new Lang.Class({
 
     _init: function(metaWindow) {
         this._metaWindow = metaWindow;
-        this.actor = new St.BoxLayout({ style_class: 'window-button-box' });
+        this.actor = new St.BoxLayout({ style_class: 'window-button-box',
+                                        x_expand: true, y_expand: true });
 
         this._icon = new St.Bin({ style_class: 'window-button-icon' });
         this.actor.add(this._icon);
-        this._label = new St.Label();
+        this._label = new St.Label({ y_align: Clutter.ActorAlign.CENTER });
         this.actor.add(this._label);
 
         this._textureCache = St.TextureCache.get_default();
@@ -202,6 +203,7 @@ const WindowButton = new Lang.Class({
         this._windowTitle = new WindowTitle(this.metaWindow);
         this.actor = new St.Button({ style_class: 'window-button',
                                      x_fill: true,
+                                     y_fill: true,
                                      can_focus: true,
                                      button_mask: St.ButtonMask.ONE |
                                                   St.ButtonMask.THREE,
@@ -396,6 +398,7 @@ const AppButton = new Lang.Class({
                            Lang.bind(this, this._updateIconGeometry));
 
         this._singleWindowTitle = new St.Bin({ x_expand: true,
+                                               y_fill: true,
                                                x_align: St.Align.START });
         stack.add_actor(this._singleWindowTitle);
 
@@ -406,7 +409,8 @@ const AppButton = new Lang.Class({
         this._icon = new St.Bin({ style_class: 'window-button-icon',
                                   child: app.create_icon_texture(ICON_TEXTURE_SIZE) });
         this._multiWindowTitle.add(this._icon);
-        this._multiWindowTitle.add(new St.Label({ text: app.get_name() }));
+        this._multiWindowTitle.add(new St.Label({ text: app.get_name(),
+                                                  y_align: Clutter.ActorAlign.CENTER }));
 
         this._menuManager = new PopupMenu.PopupMenuManager(this);
         this._menu = new PopupMenu.PopupMenu(this.actor, 0.5, St.Side.BOTTOM);
-- 
2.5.0


From e03552c1a104f0a59e630810b056de4790e0f537 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Florian=20M=C3=BCllner?= <fmuellner@gnome.org>
Date: Fri, 12 Jun 2015 18:26:17 +0200
Subject: [PATCH 2/4] window-list: Reposition on height changes

The window list position depends on both the monitor geometry and the
list height, however changes to the latter are currently ignored. For
the time being this doesn't matter due to the list's fixed height, but
we are about to scale the list with the text, so reposition the list
on height changes.

https://bugzilla.gnome.org/show_bug.cgi?id=703585
---
 extensions/window-list/extension.js | 1 +
 1 file changed, 1 insertion(+)

diff --git a/extensions/window-list/extension.js b/extensions/window-list/extension.js
index 5ceccc1..9347813 100644
--- a/extensions/window-list/extension.js
+++ b/extensions/window-list/extension.js
@@ -818,6 +818,7 @@ const WindowList = new Lang.Class({
         this._monitorsChangedId =
             Main.layoutManager.connect('monitors-changed',
                                        Lang.bind(this, this._updatePosition));
+        this.actor.connect('notify::height', Lang.bind(this, this._updatePosition));
         this._updatePosition();
 
         this._keyboardVisiblechangedId =
-- 
2.5.0


From ec0950adeeb36402ee9f1e7998284cd21100d28a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Florian=20M=C3=BCllner?= <fmuellner@gnome.org>
Date: Fri, 12 Jun 2015 19:18:28 +0200
Subject: [PATCH 3/4] window-list: Use font-relative sizes for width/height

Just like the top bar, the window list should scale according to
the font scaling factor, so convert the existing pixel sizes into
font-relative ones.

https://bugzilla.gnome.org/show_bug.cgi?id=703585
---
 extensions/window-list/stylesheet.css | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/extensions/window-list/stylesheet.css b/extensions/window-list/stylesheet.css
index 2b6be8d..f5285cb 100644
--- a/extensions/window-list/stylesheet.css
+++ b/extensions/window-list/stylesheet.css
@@ -2,7 +2,7 @@
   /* .window-button-icon height +
      .window-button vertical padding +
      .window-button > StWidget vertical padding) */
-  height: 30px;
+  height: 2.25em;
 }
 
 .window-list {
@@ -27,8 +27,8 @@
 }
 
 .window-button > StWidget {
-  -st-natural-width: 250px;
-  max-width: 250px;
+  -st-natural-width: 18.75em;
+  max-width: 18.75em;
   color: #bbb;
   background-color: black;
   border-radius: 4px;
-- 
2.5.0


From d17c72c3b42e72e82303643d4a8ee35054bb6676 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Florian=20M=C3=BCllner?= <fmuellner@gnome.org>
Date: Fri, 4 Sep 2015 19:56:23 +0200
Subject: [PATCH 4/4] window-list: Use font-relative size in classic style

Commit 85b7049376a3 fixed this for the regular session, but forgot to also
update the classic style.
---
 extensions/window-list/classic.css | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/extensions/window-list/classic.css b/extensions/window-list/classic.css
index fd84371..321c5fb 100644
--- a/extensions/window-list/classic.css
+++ b/extensions/window-list/classic.css
@@ -3,7 +3,7 @@
 #panel.bottom-panel {
     border-top-width: 1px;
     border-bottom-width: 0px;
-    height: 32px !important;
+    height: 2.25em !important;
   }
 
   .bottom-panel .window-button > StWidget {
-- 
2.5.0