aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Uebernickel <lars.uebernickel@canonical.com>2014-04-23 11:59:00 +0200
committerLars Uebernickel <lars.uebernickel@canonical.com>2014-04-23 11:59:00 +0200
commit560f93326a73ecfd8f0a907fe7264c2e641d1260 (patch)
treebba20c88aabee23b1a9f8e0e8935ba03b5935552
parentc734bb8957cc463709f92bb2b9832f365b0f70d0 (diff)
downloadayatana-ido-560f93326a73ecfd8f0a907fe7264c2e641d1260.tar.gz
ayatana-ido-560f93326a73ecfd8f0a907fe7264c2e641d1260.tar.bz2
ayatana-ido-560f93326a73ecfd8f0a907fe7264c2e641d1260.zip
idomediaplayermenuitem: use small font for track info labels
-rw-r--r--src/idomediaplayermenuitem.c22
1 files changed, 19 insertions, 3 deletions
diff --git a/src/idomediaplayermenuitem.c b/src/idomediaplayermenuitem.c
index 7e6e9d3..9b96d37 100644
--- a/src/idomediaplayermenuitem.c
+++ b/src/idomediaplayermenuitem.c
@@ -274,6 +274,22 @@ ido_media_player_menu_item_set_album_art (IdoMediaPlayerMenuItem *self,
}
static void
+gtk_label_set_markup_printf_escaped (GtkLabel *label,
+ const gchar *format,
+ ...)
+{
+ va_list args;
+ gchar *str;
+
+ va_start (args, format);
+ str = g_markup_vprintf_escaped (format, args);
+ gtk_label_set_markup (label, str);
+ va_end (args);
+
+ g_free (str);
+}
+
+static void
ido_media_player_menu_item_set_metadata (IdoMediaPlayerMenuItem *self,
const gchar *title,
const gchar *artist,
@@ -293,9 +309,9 @@ ido_media_player_menu_item_set_metadata (IdoMediaPlayerMenuItem *self,
}
else
{
- gtk_label_set_label (GTK_LABEL (self->piece_label), title);
- gtk_label_set_label (GTK_LABEL (self->artist_label), artist);
- gtk_label_set_label (GTK_LABEL (self->container_label), album);
+ gtk_label_set_markup_printf_escaped (GTK_LABEL (self->piece_label), "<small>%s</small>", title);
+ gtk_label_set_markup_printf_escaped (GTK_LABEL (self->artist_label), "<small>%s</small>", artist);
+ gtk_label_set_markup_printf_escaped (GTK_LABEL (self->container_label), "<small>%s</small>", album);
ido_media_player_menu_item_set_album_art (self, art_url);
gtk_widget_show (self->metadata_widget);
}