diff options
author | Alexey Yakovenko <waker@users.sourceforge.net> | 2013-09-10 21:08:08 +0200 |
---|---|---|
committer | Alexey Yakovenko <waker@users.sourceforge.net> | 2013-09-10 21:08:08 +0200 |
commit | 30f8d8a5dc29c3fea1b01ac48ff8c562001843ab (patch) | |
tree | abbef1427b719d14873a31db189b9441dbb0647a /plugins | |
parent | e7c2d026179ee78590fb017a326bd35374702ef4 (diff) |
gtkui: fixed group title height (was hardcoded)
Diffstat (limited to 'plugins')
-rw-r--r-- | plugins/gtkui/ddblistview.c | 2 | ||||
-rw-r--r-- | plugins/gtkui/mainplaylist.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/plugins/gtkui/ddblistview.c b/plugins/gtkui/ddblistview.c index 3cecefd4..5a6c3bf9 100644 --- a/plugins/gtkui/ddblistview.c +++ b/plugins/gtkui/ddblistview.c @@ -568,6 +568,7 @@ ddb_listview_list_configure_event (GtkWidget *widget, int height = draw_get_listview_rowheight (&ps->listctx); if (height != ps->rowheight) { ps->rowheight = height; + ps->grouptitle_height = height * 1.2; ddb_listview_build_groups (ps); } @@ -3006,7 +3007,6 @@ ddb_listview_build_groups (DdbListview *listview) { } } - listview->grouptitle_height = DEFAULT_GROUP_TITLE_HEIGHT; DdbListviewIter it = listview->binding->head (); while (it) { int res = listview->binding->get_group (it, curr, sizeof (curr)); diff --git a/plugins/gtkui/mainplaylist.c b/plugins/gtkui/mainplaylist.c index e093cee6..617e81cc 100644 --- a/plugins/gtkui/mainplaylist.c +++ b/plugins/gtkui/mainplaylist.c @@ -182,7 +182,7 @@ void main_draw_group_title (DdbListview *listview, cairo_t *drawable, DdbListvie } int ew, eh; draw_get_text_extents (&listview->listctx, str, -1, &ew, &eh); - draw_text (&listview->listctx, x + 5, y + height/2 - draw_get_font_size (&listview->listctx)/2 - 2, ew+5, 0, str); + draw_text (&listview->listctx, x + 5, y + height/2 - draw_get_listview_rowheight (&listview->listctx)/2 + 3, ew+5, 0, str); draw_line (&listview->listctx, x + 5 + ew + 3, y+height/2, x + width, y+height/2); } } |