[gnome-shell] audioDeviceSelection: Adapt to new dialog design



commit eec25367fcfac1876522a5368b669129e624df83
Author: Jonas Dreßler <verdre v0yd nl>
Date:   Mon Jan 27 22:30:12 2020 +0100

    audioDeviceSelection: Adapt to new dialog design
    
    https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/962

 data/theme/gnome-shell-sass/widgets/_dialogs.scss | 17 ++---------------
 js/ui/audioDeviceSelection.js                     | 14 +++++++-------
 2 files changed, 9 insertions(+), 22 deletions(-)
---
diff --git a/data/theme/gnome-shell-sass/widgets/_dialogs.scss 
b/data/theme/gnome-shell-sass/widgets/_dialogs.scss
index ce85c0ea05..aeb0e46b74 100644
--- a/data/theme/gnome-shell-sass/widgets/_dialogs.scss
+++ b/data/theme/gnome-shell-sass/widgets/_dialogs.scss
@@ -212,21 +212,8 @@
 
 /* Audio selection dialog */
 .audio-device-selection-dialog {
-  spacing: 30px;
-}
-
-.audio-selection-content {
-  spacing: 20px;
-  padding: 24px;
-}
-
-.audio-selection-title {
-  font-weight: bold;
-  text-align: center;
-}
-
-.audio-selection-box {
-  spacing: 20px;
+  .modal-dialog-content-box { margin-bottom: 28px; }
+  .audio-selection-box { spacing: 20px; }
 }
 
 .audio-selection-device {
diff --git a/js/ui/audioDeviceSelection.js b/js/ui/audioDeviceSelection.js
index ab0f9f594e..9bdabc225b 100644
--- a/js/ui/audioDeviceSelection.js
+++ b/js/ui/audioDeviceSelection.js
@@ -1,6 +1,7 @@
 /* exported AudioDeviceSelectionDBus */
 const { Clutter, Gio, GLib, GObject, Meta, Shell, St } = imports.gi;
 
+const Dialog = imports.ui.dialog;
 const Main = imports.ui.main;
 const ModalDialog = imports.ui.modalDialog;
 
@@ -36,18 +37,17 @@ var AudioDeviceSelectionDialog = GObject.registerClass({
     }
 
     _buildLayout() {
-        let title = new St.Label({ style_class: 'audio-selection-title',
-                                   text: _("Select Audio Device"),
-                                   x_align: Clutter.ActorAlign.CENTER });
-
-        this.contentLayout.style_class = 'audio-selection-content';
-        this.contentLayout.add(title);
+        let content = new Dialog.MessageDialogContent({
+            title: _('Select Audio Device'),
+        });
 
         this._selectionBox = new St.BoxLayout({
             style_class: 'audio-selection-box',
             x_expand: true,
         });
-        this.contentLayout.add_child(this._selectionBox);
+        content.add_child(this._selectionBox);
+
+        this.contentLayout.add_child(content);
 
         if (Main.sessionMode.allowSettings) {
             this.addButton({ action: this._openSettings.bind(this),


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