[gnome-shell] modalDialog: Hide button layout by default
- From: Florian MÃllner <fmuellner src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-shell] modalDialog: Hide button layout by default
- Date: Tue, 28 Feb 2012 17:07:41 +0000 (UTC)
commit 760da64a4ceb63e46aca4942264a6d9369ba49ea
Author: Florian MÃllner <fmuellner gnome org>
Date: Tue Feb 28 16:53:46 2012 +0100
modalDialog: Hide button layout by default
For modal dialogs without buttons, the button group still contributes
padding/spacing. To fix that, hide it by default and only show it
when actually adding buttons.
https://bugzilla.gnome.org/show_bug.cgi?id=668209
js/ui/modalDialog.js | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/js/ui/modalDialog.js b/js/ui/modalDialog.js
index 1b6e374..1bb9a48 100644
--- a/js/ui/modalDialog.js
+++ b/js/ui/modalDialog.js
@@ -87,6 +87,7 @@ const ModalDialog = new Lang.Class({
y_align: St.Align.START });
this._buttonLayout = new St.BoxLayout({ style_class: 'modal-dialog-button-box',
+ visible: false,
vertical: false });
this._dialogLayout.add(this._buttonLayout,
{ expand: true,
@@ -108,6 +109,8 @@ const ModalDialog = new Lang.Class({
this._buttonLayout.destroy_all_children();
this._actionKeys = {};
+ this._buttonLayout.visible = (buttons.length > 0);
+
for (let i = 0; i < buttons.length; i++) {
let buttonInfo = buttons[i];
let label = buttonInfo['label'];
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]