[gnome-shell] polkitAgent: Explicitly set horizontal alignment



commit 3c2aecb81f0272de4142ca285ecde140357649ca
Author: Yosef Or Boczko <yoseforb gmail com>
Date:   Wed Dec 11 22:38:58 2013 +0200

    polkitAgent: Explicitly set horizontal alignment
    
    When set to fill, the label will always end up left-aligned, which
    is only correct in LTR locales. Set the alignment explicitly to
    work in both RTL and LTR locales.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=712596

 js/ui/components/polkitAgent.js |   11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)
---
diff --git a/js/ui/components/polkitAgent.js b/js/ui/components/polkitAgent.js
index 87a490f..5ce272c 100644
--- a/js/ui/components/polkitAgent.js
+++ b/js/ui/components/polkitAgent.js
@@ -54,7 +54,9 @@ const AuthenticationDialog = new Lang.Class({
                                             text: _("Authentication Required") });
 
         messageBox.add(this._subjectLabel,
-                       { y_fill:  false,
+                       { x_fill: false,
+                         y_fill:  false,
+                         x_align: St.Align.START,
                          y_align: St.Align.START });
 
         this._descriptionLabel = new St.Label({ style_class: 'prompt-dialog-description',
@@ -63,7 +65,9 @@ const AuthenticationDialog = new Lang.Class({
         this._descriptionLabel.clutter_text.line_wrap = true;
 
         messageBox.add(this._descriptionLabel,
-                       { y_fill:  true,
+                       { x_fill: false,
+                         y_fill:  true,
+                         x_align: St.Align.START,
                          y_align: St.Align.START });
 
         if (userNames.length > 1) {
@@ -95,7 +99,8 @@ const AuthenticationDialog = new Lang.Class({
         if (userIsRoot) {
             let userLabel = new St.Label(({ style_class: 'polkit-dialog-user-root-label',
                                             text: userRealName }));
-            messageBox.add(userLabel);
+            messageBox.add(userLabel, { x_fill: false,
+                                        x_align: St.Align.START });
         } else {
             let userBox = new St.BoxLayout({ style_class: 'polkit-dialog-user-layout',
                                              vertical: false });


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