diff options
author | Alexey Yakovenko <waker@users.sourceforge.net> | 2013-10-15 23:26:44 +0200 |
---|---|---|
committer | Alexey Yakovenko <waker@users.sourceforge.net> | 2013-10-15 23:26:44 +0200 |
commit | 50e3490aa31d60371664c4f7c6794924c5ba7f8e (patch) | |
tree | 58e0428e10d64a05275eb853f527c441ab7b9572 /plugins/gtkui/plcommon.c | |
parent | 454b26668bb7ad50ee6bb375eceddac0de9124d9 (diff) |
gtkui: fixed bad merge
Diffstat (limited to 'plugins/gtkui/plcommon.c')
-rw-r--r-- | plugins/gtkui/plcommon.c | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/plugins/gtkui/plcommon.c b/plugins/gtkui/plcommon.c index f2cacd80..ac99be99 100644 --- a/plugins/gtkui/plcommon.c +++ b/plugins/gtkui/plcommon.c @@ -226,36 +226,40 @@ void draw_column_data (DdbListview *listview, cairo_t *cr, DdbListviewIter it, D GdkPixbuf *pixbuf = get_cover_art_callb (deadbeef->pl_find_meta (((DB_playItem_t *)group_it), ":URI"), artist, album, art_width, redraw_playlist_single, listview); if (pixbuf) { - int pw = gdk_pixbuf_get_width (pixbuf); + int pw = real_art_width; int ph; if (group_pinned == 1 && gtkui_groups_pinned) { ph = group_height; } else { - ph = gdk_pixbuf_get_height (pixbuf); + ph = pw; } if (sy < ph) { - pw = min (art_width, pw); + cairo_save (cr); if (group_pinned == 1 && gtkui_groups_pinned) { - int ph_real = gdk_pixbuf_get_height (pixbuf); + int ph_real = real_art_width; if (grp_next_y <= ph_real + listview->grouptitle_height) { - gdk_cairo_set_source_pixbuf (cr, pixbuf, (x + ART_PADDING_HORZ)-0, grp_next_y - ph_real); cairo_rectangle (cr, x + ART_PADDING_HORZ, grp_next_y - ph_real, pw, ph); + cairo_translate (cr, (x + ART_PADDING_HORZ)-0, grp_next_y - ph_real); } else { - gdk_cairo_set_source_pixbuf (cr, pixbuf, (x + ART_PADDING_HORZ)-0, listview->grouptitle_height); cairo_rectangle (cr, x + ART_PADDING_HORZ, listview->grouptitle_height, pw, ph); + cairo_translate (cr, (x + ART_PADDING_HORZ)-0, listview->grouptitle_height); } } else { ph -= sy; ph = min (ph, h); - 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_translate (cr, (x + ART_PADDING_HORZ)-0, (art_y)-sy); } + cairo_scale (cr, (float)art_scale, (float)art_scale); + gdk_cairo_set_source_pixbuf (cr, pixbuf, 0, 0); + cairo_pattern_set_filter (cairo_get_source(cr), art_width == real_art_width ? CAIRO_FILTER_GAUSSIAN : CAIRO_FILTER_FAST); cairo_fill (cr); + cairo_restore (cr); } } } |