aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorCharles Kerr <charles.kerr@canonical.com>2013-07-02 22:54:31 +0000
committerTarmac <Unknown>2013-07-02 22:54:31 +0000
commit829c2c24e45338a97d06805bcf78a6ece2389aa6 (patch)
tree9f09eb5154b0bcf329aa0fcf0a5133a8e450e829 /src
parent20247ad55ce6325bff72084749835bcdf025f808 (diff)
parent644fe6e5537e8717f1e65eba0959213032216681 (diff)
downloadayatana-ido-829c2c24e45338a97d06805bcf78a6ece2389aa6.tar.gz
ayatana-ido-829c2c24e45338a97d06805bcf78a6ece2389aa6.tar.bz2
ayatana-ido-829c2c24e45338a97d06805bcf78a6ece2389aa6.zip
fix IdoLocationMenuItem label alignment issue reported by ted.
Approved by PS Jenkins bot, Ted Gould.
Diffstat (limited to 'src')
-rw-r--r--src/idolocationmenuitem.c25
1 files changed, 19 insertions, 6 deletions
diff --git a/src/idolocationmenuitem.c b/src/idolocationmenuitem.c
index 347c9e8..94dfb70 100644
--- a/src/idolocationmenuitem.c
+++ b/src/idolocationmenuitem.c
@@ -297,8 +297,8 @@ static void
ido_location_menu_item_init (IdoLocationMenuItem *self)
{
priv_t * p;
- GtkBox * box;
GtkWidget * w;
+ GtkGrid * grid;
self->priv = G_TYPE_INSTANCE_GET_PRIVATE (self,
IDO_LOCATION_MENU_ITEM_TYPE,
@@ -307,13 +307,26 @@ ido_location_menu_item_init (IdoLocationMenuItem *self)
p = self->priv;
p->name_label = gtk_label_new (NULL);
- p->timestamp_label = gtk_label_new (NULL);
+ gtk_misc_set_alignment (GTK_MISC(p->name_label), 0.0, 0.5);
- w = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 3);
+ p->timestamp_label = gtk_label_new (NULL);
gtk_misc_set_alignment (GTK_MISC(p->timestamp_label), 1.0, 0.5);
- box = GTK_BOX (w);
- gtk_box_pack_start (box, p->name_label, FALSE, FALSE, 3);
- gtk_box_pack_end (box, p->timestamp_label, FALSE, FALSE, 5);
+
+ w = gtk_grid_new ();
+ grid = GTK_GRID (w);
+ gtk_grid_attach (grid, p->name_label, 0, 0, 1, 1);
+ gtk_grid_attach (grid, p->timestamp_label, 1, 0, 1, 1);
+ g_object_set (p->name_label,
+ "halign", GTK_ALIGN_START,
+ "hexpand", TRUE,
+ "margin-right", 6,
+ "valign", GTK_ALIGN_CENTER,
+ NULL);
+ g_object_set (p->timestamp_label,
+ "halign", GTK_ALIGN_END,
+ "hexpand", FALSE,
+ "valign", GTK_ALIGN_CENTER,
+ NULL);
gtk_widget_show_all (w);
gtk_container_add (GTK_CONTAINER (self), w);