summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorGravatar Alexey Yakovenko <wakeroid@gmail.com>2009-12-27 13:40:36 +0100
committerGravatar Alexey Yakovenko <wakeroid@gmail.com>2009-12-27 13:40:36 +0100
commit3218e5d52cd775861499db85258c0d8910cbd513 (patch)
tree35abb1216ee34ce518639f867871072ca69feb73 /plugins
parent4b3bf9ce43a60652db553584d914bb5471cd2756 (diff)
render playlist cursor without using gtkstyle
Diffstat (limited to 'plugins')
-rw-r--r--plugins/gtkui/gtkplaylist.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/plugins/gtkui/gtkplaylist.c b/plugins/gtkui/gtkplaylist.c
index 01e7efef..dcfabe32 100644
--- a/plugins/gtkui/gtkplaylist.c
+++ b/plugins/gtkui/gtkplaylist.c
@@ -351,7 +351,11 @@ gtkpl_draw_pl_row_back (gtkplaylist_t *ps, int row, DB_playItem_t *it) {
GtkWidget *widget = ps->playlist;
gtk_paint_flat_box (treeview->style, ps->backbuf, (it && SELECTED(it)) ? GTK_STATE_SELECTED : GTK_STATE_NORMAL, GTK_SHADOW_NONE, NULL, treeview, (row & 1) ? "cell_even_ruled" : "cell_odd_ruled", x, row * rowheight - ps->scrollpos * rowheight, w, rowheight);
if (row == deadbeef->pl_get_cursor (ps->iterator)) {
- gtk_paint_focus (treeview->style, ps->backbuf, (it && SELECTED(it)) ? GTK_STATE_SELECTED : GTK_STATE_NORMAL, NULL, treeview, "treeview", x, row * rowheight - ps->scrollpos * rowheight, w, rowheight);
+ // not all gtk engines/themes render focus rectangle in treeviews
+ // but we want it anyway
+ gdk_draw_rectangle (ps->backbuf, treeview->style->fg_gc[GTK_STATE_NORMAL], FALSE, x, row * rowheight - ps->scrollpos * rowheight, w-1, rowheight-1);
+ // gtkstyle focus drawing, for reference
+// gtk_paint_focus (treeview->style, ps->backbuf, (it && SELECTED(it)) ? GTK_STATE_SELECTED : GTK_STATE_NORMAL, NULL, treeview, "treeview", x, row * rowheight - ps->scrollpos * rowheight, w, rowheight);
}
}