dialog: Remove messageBox container from MessageDialogContent

`MessageDialogContent.messageBox` is not really needed and was only
needed to show icons, which is now no longer supported. The styling can
also be done using other CSS classes and this makes it a bit more
straightforward to add actors to the MessageDialogContent.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/886
This commit is contained in:
Jonas Dreßler 2019-12-05 10:55:00 +01:00 committed by Florian Müllner
parent 5d99bdbe5e
commit 48f1c4b9d7
2 changed files with 10 additions and 17 deletions

View File

@ -5,7 +5,9 @@
@extend %bubble_panel; @extend %bubble_panel;
.modal-dialog-content-box { .modal-dialog-content-box {
padding: $base_padding * 4; margin: 32px 40px;
spacing: 32px;
max-width: 28em;
} }
.run-dialog-entry { width: 20em; margin-bottom: 6px; } .run-dialog-entry { width: 20em; margin-bottom: 6px; }
@ -32,11 +34,6 @@
} }
/* Message Dialog */ /* Message Dialog */
.message-dialog-main-layout {
padding: 12px 20px 0;
spacing: 12px;
}
.message-dialog-content { .message-dialog-content {
max-width: 28em; max-width: 28em;
spacing: 20px; spacing: 20px;
@ -118,7 +115,6 @@
//this is the width of the entire modal popup //this is the width of the entire modal popup
width: 34em; width: 34em;
.message-dialog-main-layout { spacing: 24px; padding: 10px; }
.message-dialog-content { spacing: $base_spacing * 4; } .message-dialog-content { spacing: $base_spacing * 4; }
.message-dialog-title { color: lighten($fg_color,15%); } .message-dialog-title { color: lighten($fg_color,15%); }
} }
@ -247,7 +243,6 @@
/* Extension Dialog */ /* Extension Dialog */
.extension-dialog { .extension-dialog {
@extend %bubble_panel; @extend %bubble_panel;
.message-dialog-main-layout { spacing: 24px; padding: 10px; }
.message-dialog-title { font-weight: normal; color: $fg_color; } .message-dialog-title { font-weight: normal; color: $fg_color; }
} }

View File

@ -179,18 +179,16 @@ var MessageDialogContent = GObject.registerClass({
this._subtitle.clutter_text.set(textProps); this._subtitle.clutter_text.set(textProps);
this._body.clutter_text.set(textProps); this._body.clutter_text.set(textProps);
let defaultParams = { style_class: 'message-dialog-main-layout' }; let defaultParams = {
super._init(Object.assign(defaultParams, params));
this.messageBox = new St.BoxLayout({
style_class: 'message-dialog-content', style_class: 'message-dialog-content',
x_expand: true, x_expand: true,
vertical: true, vertical: true,
}); };
this.messageBox.add_actor(this._title); super._init(Object.assign(defaultParams, params));
this.messageBox.add_actor(this._subtitle);
this.messageBox.add_actor(this._body); this.add_child(this._title);
this.add_actor(this.messageBox); this.add_child(this._subtitle);
this.add_child(this._body);
} }
get title() { get title() {