diff options
author | Didier Roche <didrocks@ubuntu.com> | 2011-09-13 12:20:29 +0200 |
---|---|---|
committer | Package Import Robot <package-import@ubuntu.com> | 2011-09-13 12:20:29 +0200 |
commit | 22c7d6a1bfd61a4f5e81279d4b01063a096f19e0 (patch) | |
tree | 478abffce952d0262fac71485745dcd9a7733135 /src/metadata-widget.c | |
parent | d13e523b7aa582734b3d4bc06735cfa00fb318e3 (diff) | |
parent | 886588b78ecf730719b5f5686e7a277dde27515d (diff) | |
download | ayatana-indicator-sound-22c7d6a1bfd61a4f5e81279d4b01063a096f19e0.tar.gz ayatana-indicator-sound-22c7d6a1bfd61a4f5e81279d4b01063a096f19e0.tar.bz2 ayatana-indicator-sound-22c7d6a1bfd61a4f5e81279d4b01063a096f19e0.zip |
* New upstream release
* add 01_fix_FTBFS.patch for needed -lm link
Diffstat (limited to 'src/metadata-widget.c')
-rw-r--r-- | src/metadata-widget.c | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/src/metadata-widget.c b/src/metadata-widget.c index d21c10d..8ab7d1d 100644 --- a/src/metadata-widget.c +++ b/src/metadata-widget.c @@ -212,9 +212,9 @@ metadata_widget_init (MetadataWidget *self) // player label GtkWidget* player_label; player_label = gtk_label_new(""); - gtk_misc_set_alignment(GTK_MISC(player_label), (gfloat)0, (gfloat)0); + gtk_misc_set_alignment(GTK_MISC(player_label), (gfloat)0, (gfloat)0.5); gtk_misc_set_padding (GTK_MISC(player_label), (gfloat)1, (gfloat)0); - gtk_widget_set_size_request (player_label, 200, 25); + gtk_widget_set_size_request (player_label, 200, 24); priv->player_label = player_label; gtk_box_pack_start (GTK_BOX(outer_v_box), priv->player_label, FALSE, FALSE, 0); @@ -319,9 +319,8 @@ metadata_widget_icon_triangle_draw_cb_gtk_3 (GtkWidget *widget, MetadataWidgetPrivate * priv = METADATA_WIDGET_GET_PRIVATE(meta); GtkStyle *style; - int x, y, arrow_width, arrow_height; + int x, y, arrow_width, arrow_height; - gint offset = 3; arrow_width = 5; arrow_height = 9; @@ -331,7 +330,9 @@ metadata_widget_icon_triangle_draw_cb_gtk_3 (GtkWidget *widget, gtk_widget_get_allocation (widget, &allocation); x = allocation.x; y = 0; - + + gint offset = (allocation.height - gdk_pixbuf_get_height (priv->icon_buf)) / 2; + // Draw player icon if (priv->icon_buf != NULL){ gdk_cairo_set_source_pixbuf (cr, @@ -340,11 +341,11 @@ metadata_widget_icon_triangle_draw_cb_gtk_3 (GtkWidget *widget, y + offset); cairo_paint (cr); } - + // Draw triangle but only if the player is running. if (dbusmenu_menuitem_property_get_bool (priv->twin_item, DBUSMENU_METADATA_MENUITEM_PLAYER_RUNNING)){ - y += (double)arrow_height/2.0 + offset; + y += allocation.height/2.0 - (double)arrow_height/2.0; cairo_set_line_width (cr, 1.0); //g_debug ("triangle drawing"); @@ -426,9 +427,8 @@ metadata_widget_icon_triangle_draw_cb (GtkWidget *widget, GtkStyle *style; cairo_t *cr; - int x, y, arrow_width, arrow_height; + int x, y, arrow_width, arrow_height; - gint offset = 3; arrow_width = 5; arrow_height = 9; @@ -440,7 +440,9 @@ metadata_widget_icon_triangle_draw_cb (GtkWidget *widget, gtk_widget_get_allocation (widget, &allocation); x = allocation.x; y = allocation.y; - + + gint offset = (allocation.height - gdk_pixbuf_get_height (priv->icon_buf)) / 2; + // Draw player icon if (priv->icon_buf != NULL){ gdk_cairo_set_source_pixbuf (cr, @@ -449,11 +451,11 @@ metadata_widget_icon_triangle_draw_cb (GtkWidget *widget, y + offset); cairo_paint (cr); } - + // Draw triangle but only if the player is running. if (dbusmenu_menuitem_property_get_bool (priv->twin_item, DBUSMENU_METADATA_MENUITEM_PLAYER_RUNNING)){ - y += (double)arrow_height/2.0 + offset; + y += allocation.height/2.0 - (double)arrow_height/2.0; cairo_set_line_width (cr, 1.0); cairo_move_to (cr, x, y); |