summaryrefslogtreecommitdiff
path: root/plugins/gtkui/mainplaylist.c
diff options
context:
space:
mode:
authorGravatar Alexey Yakovenko <wakeroid@gmail.com>2010-02-27 14:49:18 +0100
committerGravatar Alexey Yakovenko <wakeroid@gmail.com>2010-02-27 14:49:18 +0100
commit7c519d751ed4e22312593180b2192a897fe8b7b8 (patch)
tree294a524a9b8ca130100ca47e73cf397354fce21b /plugins/gtkui/mainplaylist.c
parent007d48cd16a14d9da8e41686ececd8a3a6052213 (diff)
fixed listview text color
Diffstat (limited to 'plugins/gtkui/mainplaylist.c')
-rw-r--r--plugins/gtkui/mainplaylist.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/plugins/gtkui/mainplaylist.c b/plugins/gtkui/mainplaylist.c
index 0788e7ff..20d82267 100644
--- a/plugins/gtkui/mainplaylist.c
+++ b/plugins/gtkui/mainplaylist.c
@@ -36,6 +36,9 @@ static uintptr_t play16_pixbuf;
static uintptr_t pause16_pixbuf;
static uintptr_t buffering16_pixbuf;
+// HACK!!
+extern GtkWidget *theme_treeview;
+
static int
main_get_count (void) {
return deadbeef->pl_getcount (PL_MAIN);
@@ -301,6 +304,15 @@ void main_draw_column_data (DdbListview *listview, GdkDrawable *drawable, DdbLis
else {
char text[1024];
deadbeef->pl_format_title (it, -1, text, sizeof (text), cinf->id, cinf->format);
+ GdkColor *color = NULL;
+ if (deadbeef->pl_is_selected (it)) {
+ color = &theme_treeview->style->text[GTK_STATE_SELECTED];
+ }
+ else {
+ color = &theme_treeview->style->text[GTK_STATE_NORMAL];
+ }
+ float fg[3] = {(float)color->red/0xffff, (float)color->green/0xffff, (float)color->blue/0xffff};
+ draw_set_fg_color (fg);
if (calign_right) {
draw_text (x+5, y + height/2 - draw_get_font_size ()/2 - 2, cwidth-10, 1, text);