- gdk_draw_rectangle (clist->clist_window,
- GTK_WIDGET(clist)->style->
- fg_gc[GTK_STATE_SELECTED], TRUE,
- xdest - xoffset - PM_SIZE,
- clip_rectangle.y + yoffset,
- PM_SIZE, PM_SIZE);
-
- gdk_draw_rectangle (clist->clist_window, tgc, FALSE,
- xdest - xoffset - PM_SIZE,
- clip_rectangle.y + yoffset,
- PM_SIZE, PM_SIZE);
-
- gdk_draw_line (clist->clist_window, tgc, xdest - xoffset - 2,
- ycenter, xdest - xoffset - PM_SIZE + 2, ycenter);
+ gdk_gc_set_clip_rectangle (cgc, rect);
+
+ if (ctree->line_style == GTK_CTREE_LINES_NONE)
+ {
+ GdkPoint points[3];
+
+ if (!((GtkCTreeRow *)clist_row)->expanded)
+ {
+ points[0].x = xdest - xoffset - PM_SIZE / 6;
+ points[0].y = clip_rectangle.y + yoffset;
+ points[1].x = points[0].x;
+ points[1].y = points[0].y + PM_SIZE;
+ points[2].x = points[0].x - 2 * PM_SIZE / 3;
+ points[2].y = points[0].y + PM_SIZE / 2;
+ }
+ else
+ {
+ points[0].x = xdest - xoffset;
+ points[0].y = clip_rectangle.y + yoffset +
+ PM_SIZE / 6;
+ points[1].x = points[0].x - PM_SIZE;
+ points[1].y = points[0].y;
+ points[2].x = points[0].x - PM_SIZE / 2;
+ points[2].y = clip_rectangle.y + yoffset +
+ 2 * PM_SIZE / 3;
+ }
+
+ gdk_draw_polygon (clist->clist_window,
+ GTK_WIDGET (clist)->style->
+ fg_gc[GTK_STATE_SELECTED],
+ TRUE, points, 3);
+ gdk_draw_polygon (clist->clist_window, tgc, FALSE,
+ points, 3);
+ }
+ else
+ {
+ gdk_draw_rectangle (clist->clist_window,
+ GTK_WIDGET(clist)->style->
+ fg_gc[GTK_STATE_SELECTED], TRUE,
+ xdest - xoffset - PM_SIZE,
+ clip_rectangle.y + yoffset,
+ PM_SIZE, PM_SIZE);
+
+ gdk_draw_rectangle (clist->clist_window, tgc, FALSE,
+ xdest - xoffset - PM_SIZE,
+ clip_rectangle.y + yoffset,
+ PM_SIZE, PM_SIZE);
+
+ gdk_draw_line (clist->clist_window, tgc,
+ xdest - xoffset - 2, ycenter,
+ xdest - xoffset - PM_SIZE + 2, ycenter);