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
This commit is contained in:
parent
714ffc5ef1
commit
760da64a4c
@ -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'];
|
||||
|
Loading…
Reference in New Issue
Block a user