[gnome-weather] World: fix alignment of the placeholder



commit bbab2e82f8ccd147214027344e8416ad68b7cc6d
Author: Giovanni Campagna <gcampagna src gnome org>
Date:   Thu Mar 6 14:36:31 2014 +0100

    World: fix alignment of the placeholder
    
    We need to set GtkLabel::xalign in addition to GtkWidget::halign,
    because the latter governs the widget within the allocation, the
    former the text within the widget content area.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=721732

 src/world.js |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)
---
diff --git a/src/world.js b/src/world.js
index fc935d1..421e928 100644
--- a/src/world.js
+++ b/src/world.js
@@ -238,7 +238,8 @@ const WorldContentView = new Lang.Class({
                                            column_spacing: 6 });
         this._placeHolder.get_style_context().add_class('dim-label');
 
-        let iconGrid = new Gtk.Grid({ row_spacing: 4, column_spacing: 4 });
+        let iconGrid = new Gtk.Grid({ row_spacing: 4, column_spacing: 4,
+                                      valign: Gtk.Align.CENTER });
         iconGrid.attach(new Gtk.Image({ icon_name: 'weather-overcast-symbolic',
                                         icon_size: Gtk.IconSize.LARGE_TOOLBAR }),
                         0, 0, 1, 1);
@@ -262,6 +263,7 @@ const WorldContentView = new Lang.Class({
                                                  use_markup: true,
                                                  max_width_chars: 30,
                                                  wrap: true,
+                                                 xalign: 0.0,
                                                  halign: Gtk.Align.START,
                                                  valign: Gtk.Align.START }),
                                  1, 1, 1, 1);


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