From b97c111bde8b363ae04afb75fc03bc3261b9b450 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20M=C3=BCllner?= Date: Fri, 12 Jun 2015 20:23:00 +0200 Subject: [PATCH] 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 88ba6031..3952f2b6 100644 --- a/extensions/window-list/extension.js +++ b/extensions/window-list/extension.js @@ -139,11 +139,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(); @@ -205,6 +206,7 @@ const BaseButton = new Lang.Class({ 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 }); @@ -472,6 +474,7 @@ const AppButton = new Lang.Class({ this.actor.set_child(stack); this._singleWindowTitle = new St.Bin({ x_expand: true, + y_fill: true, x_align: St.Align.START }); stack.add_actor(this._singleWindowTitle); @@ -482,7 +485,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);