[gnome-shell] dialog: Remove messageBox container from MessageDialogContent



commit 48f1c4b9d74b8f9121b756d71a91ea56f5d6b8f6
Author: Jonas Dreßler <verdre v0yd nl>
Date:   Thu Dec 5 10:55:00 2019 +0100

    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

 data/theme/gnome-shell-sass/widgets/_dialogs.scss | 11 +++--------
 js/ui/dialog.js                                   | 16 +++++++---------
 2 files changed, 10 insertions(+), 17 deletions(-)
---
diff --git a/data/theme/gnome-shell-sass/widgets/_dialogs.scss 
b/data/theme/gnome-shell-sass/widgets/_dialogs.scss
index 373291b5a0..dc846369fd 100644
--- a/data/theme/gnome-shell-sass/widgets/_dialogs.scss
+++ b/data/theme/gnome-shell-sass/widgets/_dialogs.scss
@@ -5,7 +5,9 @@
   @extend %bubble_panel;
 
   .modal-dialog-content-box {
-    padding: $base_padding * 4;
+    margin: 32px 40px;
+    spacing: 32px;
+    max-width: 28em;
   }
 
   .run-dialog-entry { width: 20em; margin-bottom: 6px; }
@@ -32,11 +34,6 @@
 }
 
 /* Message Dialog */
-.message-dialog-main-layout {
-  padding: 12px 20px 0;
-  spacing: 12px;
-}
-
 .message-dialog-content {
   max-width: 28em;
   spacing: 20px;
@@ -118,7 +115,6 @@
   //this is the width of the entire modal popup
   width: 34em;
 
-  .message-dialog-main-layout { spacing: 24px; padding: 10px; }
   .message-dialog-content { spacing: $base_spacing * 4; }
   .message-dialog-title { color: lighten($fg_color,15%); }
 }
@@ -247,7 +243,6 @@
 /* Extension Dialog */
 .extension-dialog {
   @extend %bubble_panel;
-  .message-dialog-main-layout { spacing: 24px; padding: 10px; }
   .message-dialog-title { font-weight: normal; color: $fg_color; }
 }
 
diff --git a/js/ui/dialog.js b/js/ui/dialog.js
index 8b4fde1ffa..cce00c8466 100644
--- a/js/ui/dialog.js
+++ b/js/ui/dialog.js
@@ -179,18 +179,16 @@ var MessageDialogContent = GObject.registerClass({
         this._subtitle.clutter_text.set(textProps);
         this._body.clutter_text.set(textProps);
 
-        let defaultParams = { style_class: 'message-dialog-main-layout' };
-        super._init(Object.assign(defaultParams, params));
-
-        this.messageBox = new St.BoxLayout({
+        let defaultParams = {
             style_class: 'message-dialog-content',
             x_expand: true,
             vertical: true,
-        });
-        this.messageBox.add_actor(this._title);
-        this.messageBox.add_actor(this._subtitle);
-        this.messageBox.add_actor(this._body);
-        this.add_actor(this.messageBox);
+        };
+        super._init(Object.assign(defaultParams, params));
+
+        this.add_child(this._title);
+        this.add_child(this._subtitle);
+        this.add_child(this._body);
     }
 
     get title() {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]