diff options
author | 2010-05-06 21:35:21 +0200 | |
---|---|---|
committer | 2010-05-06 21:35:21 +0200 | |
commit | d176af15194b88c9cf9806b5882c4a891d8e1556 (patch) | |
tree | ff7195197a626e5ac615a16e6e864ff284f1989b /plugins/gtkui/ddblistview.c | |
parent | 9dc1385f68f6b3349e1422044bec19339f52e8f5 (diff) |
fixed drawing playlist background with custom colors
Diffstat (limited to 'plugins/gtkui/ddblistview.c')
-rw-r--r-- | plugins/gtkui/ddblistview.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/plugins/gtkui/ddblistview.c b/plugins/gtkui/ddblistview.c index 3e5d67ba..b1bc774e 100644 --- a/plugins/gtkui/ddblistview.c +++ b/plugins/gtkui/ddblistview.c @@ -680,7 +680,17 @@ ddb_listview_list_render (DdbListview *listview, int x, int y, int w, int h) { if (grp_y < y + h + listview->scrollpos) { int hh = y + h - (grp_y - listview->scrollpos); // gdk_draw_rectangle (listview->backbuf, listview->list->style->bg_gc[GTK_STATE_NORMAL], TRUE, x, grp_y - listview->scrollpos, w, hh); - gtk_paint_flat_box (treeview->style, listview->backbuf, GTK_STATE_NORMAL, GTK_SHADOW_NONE, NULL, treeview, "cell_even_ruled", x, grp_y - listview->scrollpos, w, hh); + int theming = !gtkui_override_listview_colors (); + if (theming) { + gtk_paint_flat_box (treeview->style, listview->backbuf, GTK_STATE_NORMAL, GTK_SHADOW_NONE, NULL, treeview, "cell_even_ruled", x, grp_y - listview->scrollpos, w, hh); + } + else { + GdkColor clr; + GdkGC *gc = gdk_gc_new (listview->backbuf); + gdk_gc_set_rgb_fg_color (gc, (gtkui_get_listview_even_row_color (&clr), &clr)); + gdk_draw_rectangle (listview->backbuf, gc, TRUE, x, grp_y - listview->scrollpos, w, hh); + g_object_unref (gc); + } } draw_end (); } |