diff options
author | 2010-05-02 15:49:01 +0200 | |
---|---|---|
committer | 2010-05-02 15:49:01 +0200 | |
commit | 6f1afe36cd5f4584c889d54353ccd209fce15f23 (patch) | |
tree | 58c9953d4bfd0ab2db04223be4c4f429c741f6c7 /plugins | |
parent | f8b5c34639e3ed933318dffeed3fcf838467955d (diff) |
fixed drawing group titles with overriden playlist colors
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/gtkui/mainplaylist.c | 17 |
1 files changed, 13 insertions, 4 deletions
diff --git a/plugins/gtkui/mainplaylist.c b/plugins/gtkui/mainplaylist.c index 8ea4041c..4ff9c95f 100644 --- a/plugins/gtkui/mainplaylist.c +++ b/plugins/gtkui/mainplaylist.c @@ -149,13 +149,22 @@ void main_draw_group_title (DdbListview *listview, GdkDrawable *drawable, DdbLis if (group_by_str && group_by_str[0]) { char str[1024]; deadbeef->pl_format_title ((DB_playItem_t *)it, -1, str, sizeof (str), -1, group_by_str); - GdkColor *clr = &theme_treeview->style->fg[GTK_STATE_NORMAL]; - float rgb[] = {clr->red/65535.f, clr->green/65535.f, clr->blue/65535.f}; - draw_set_fg_color (rgb); + int theming = !gtkui_override_listview_colors (); + if (theming) { + GdkColor *clr = &theme_treeview->style->fg[GTK_STATE_NORMAL]; + float rgb[] = {clr->red/65535.f, clr->green/65535.f, clr->blue/65535.f}; + draw_set_fg_color (rgb); + } + else { + GdkColor clr; + gtkui_get_listview_text_color (&clr); + float rgb[] = {clr.red/65535.f, clr.green/65535.f, clr.blue/65535.f}; + draw_set_fg_color (rgb); + } int ew, eh; draw_text (x + 5, y + height/2 - draw_get_font_size ()/2 - 2, width-10, 0, str); draw_get_text_extents (str, -1, &ew, &eh); - gdk_draw_line (drawable, theme_treeview->style->fg_gc[GTK_STATE_NORMAL], x + 5 + ew + 3, y+height/2, x + width, y+height/2); + draw_line (x + 5 + ew + 3, y+height/2, x + width, y+height/2); } } void |