summaryrefslogtreecommitdiff
path: root/plugins/gtkui/mainplaylist.c
diff options
context:
space:
mode:
authorGravatar Alexey Yakovenko <wakeroid@gmail.com>2010-03-16 22:12:26 +0100
committerGravatar Alexey Yakovenko <wakeroid@gmail.com>2010-03-16 22:12:26 +0100
commit9c07cc41bd33642fb28f446b43755412c5a8f07e (patch)
treed20902075356f0eb15027a682304205d03795311 /plugins/gtkui/mainplaylist.c
parentbbffcf09fbeb6955d87268f77aeeee65f9a6da6d (diff)
few tweaks to group title drawing
Diffstat (limited to 'plugins/gtkui/mainplaylist.c')
-rw-r--r--plugins/gtkui/mainplaylist.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/plugins/gtkui/mainplaylist.c b/plugins/gtkui/mainplaylist.c
index 87d0276d..1815d0aa 100644
--- a/plugins/gtkui/mainplaylist.c
+++ b/plugins/gtkui/mainplaylist.c
@@ -140,9 +140,13 @@ 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);
- float clr[] = {0, 0.1, 0.5};
- draw_set_fg_color (clr);
+ 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 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);
}
}
void