diff options
author | waker <wakeroid@gmail.com> | 2011-10-08 17:18:25 +0200 |
---|---|---|
committer | waker <wakeroid@gmail.com> | 2011-10-08 17:20:40 +0200 |
commit | cfe2e9caded2c1ac12e8416c2204f681a9d5ee01 (patch) | |
tree | 9827dfdc4214377da8fef4535c9f7ed0ead6a155 /plugins | |
parent | cb1c025f945fe46dab39b70712cbe4378ae24970 (diff) |
fixed album art and playback starus drawing using cairo
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/gtkui/ddblistview.c | 2 | ||||
-rw-r--r-- | plugins/gtkui/plcommon.c | 9 |
2 files changed, 7 insertions, 4 deletions
diff --git a/plugins/gtkui/ddblistview.c b/plugins/gtkui/ddblistview.c index a89f2039..f81333f4 100644 --- a/plugins/gtkui/ddblistview.c +++ b/plugins/gtkui/ddblistview.c @@ -1338,7 +1338,7 @@ ddb_listview_list_render_row_background (DdbListview *ps, cairo_t *cr, DdbListvi GdkColor clr; gtkui_get_listview_cursor_color (&clr); cairo_set_source_rgb (cr, clr.red/65535.f, clr.green/65535.f, clr.blue/65535.f); - cairo_rectangle (cr, x, y, w-1, h-1); + cairo_rectangle (cr, x+1, y+1, w-1, h-1); cairo_stroke (cr); } } diff --git a/plugins/gtkui/plcommon.c b/plugins/gtkui/plcommon.c index 7ba89804..3fea720c 100644 --- a/plugins/gtkui/plcommon.c +++ b/plugins/gtkui/plcommon.c @@ -127,7 +127,6 @@ void draw_column_data (DdbListview *listview, cairo_t *cr, DdbListviewIter it, D if (group_it) { int h = cwidth - group_y; h = min (height, art_h); -// gdk_draw_rectangle (drawable, GTK_WIDGET (listview)->style->white_gc, TRUE, x, y, width, h); const char *album = deadbeef->pl_find_meta (group_it, "album"); const char *artist = deadbeef->pl_find_meta (group_it, "artist"); if (!album || !*album) { @@ -142,7 +141,9 @@ void draw_column_data (DdbListview *listview, cairo_t *cr, DdbListviewIter it, D pw = min (art_width, pw); ph -= sy; ph = min (ph, h); - // FIXME gdk_draw_pixbuf (drawable, GTK_WIDGET (listview)->style->white_gc, pixbuf, 0, sy, x + ART_PADDING_HORZ, art_y, pw, ph, GDK_RGB_DITHER_NONE, 0, 0); + gdk_cairo_set_source_pixbuf (cr, pixbuf, (x + ART_PADDING_HORZ)-0, (art_y)-sy); + cairo_rectangle (cr, x + ART_PADDING_HORZ, art_y, pw, ph); + cairo_fill (cr); } g_object_unref (pixbuf); } @@ -162,7 +163,9 @@ void draw_column_data (DdbListview *listview, cairo_t *cr, DdbListviewIter it, D else { pixbuf = buffering16_pixbuf; } - // FIXME gdk_draw_pixbuf (drawable, GTK_WIDGET (listview)->style->black_gc, pixbuf, 0, 0, x + cwidth/2 - 8, y + height/2 - 8, 16, 16, GDK_RGB_DITHER_NONE, 0, 0); + gdk_cairo_set_source_pixbuf (cr, pixbuf, x + cwidth/2 - 8, y + height/2 - 8); + cairo_rectangle (cr, x + cwidth/2 - 8, y + height/2 - 8, 16, 16); + cairo_fill (cr); } else if (it) { char text[1024]; |