ocarina: Left justify tag labels

I like this look better than the centered look.
This commit is contained in:
Bryan Schumaker 2011-11-07 19:06:49 -05:00
parent 258ebbc081
commit 5ae5174536
1 changed files with 10 additions and 3 deletions

View File

@ -26,6 +26,13 @@ static void set_album(string new_album)
gtk_label_set_markup(GTK_LABEL(album), markup.c_str());
}
static GtkWidget *align(GtkWidget *label)
{
GtkWidget *alignment = gtk_alignment_new(0.0, 0.5, 0.0, 0.0);
gtk_container_add(GTK_CONTAINER(alignment), label);
return alignment;
}
static void make_nowplaying()
{
GtkWidget *tag_box = gtk_vbox_new(FALSE, 0);
@ -39,9 +46,9 @@ static void make_nowplaying()
set_artist(" ");
set_album(" ");
box_pack_start(tag_box, title, FALSE, FALSE, 0);
box_pack_start(tag_box, artist, FALSE, FALSE, 0);
box_pack_start(tag_box, album, FALSE, FALSE, 0);
box_pack_start(tag_box, align(title), FALSE, FALSE, 0);
box_pack_start(tag_box, align(artist), FALSE, FALSE, 0);
box_pack_start(tag_box, align(album), FALSE, FALSE, 0);
box_pack_start(now_playing, tag_box, FALSE, FALSE, 0);
gtk_widget_show_all(now_playing);