@@ -108,7 +108,7 @@ draw_arrow(GitgCellRendererPath *self, cairo_t *cr, GdkRectangle *area, gint8 la
108
108
}
109
109
110
110
static void
111
- draw_paths_real (GitgCellRendererPath * self , cairo_t * cr , GdkRectangle * area , GitgRevision * revision , gboolean top , gdouble yoffset )
111
+ draw_paths_real (GitgCellRendererPath * self , cairo_t * cr , GdkRectangle * area , GitgRevision * revision , gdouble yoffset )
112
112
{
113
113
if (!revision )
114
114
return ;
@@ -129,13 +129,12 @@ draw_paths_real(GitgCellRendererPath *self, cairo_t *cr, GdkRectangle *area, Git
129
129
for (item = lane -> from ; item ; item = item -> next )
130
130
{
131
131
gint8 from = (gint8 )GPOINTER_TO_INT (item -> data );
132
- gdouble xf = 0.0 ;
133
-
134
- if (from != to )
135
- xf = 0.5 * (to - from );
136
-
137
- cairo_move_to (cr , area -> x + (from + (top ? xf : 0 )) * cw + cw / 2.0 , area -> y + yoffset * ch );
138
- cairo_line_to (cr , area -> x + (to - (top ? 0 : xf )) * cw + cw / 2.0 , area -> y + (yoffset + 1 ) * ch );
132
+
133
+ cairo_move_to (cr , area -> x + from * cw + cw / 2.0 , area -> y + yoffset * ch );
134
+ cairo_curve_to (cr , area -> x + from * cw + cw / 2.0 , area -> y + (yoffset + 1 ) * ch ,
135
+ area -> x + to * cw + cw / 2.0 , area -> y + (yoffset + 1 ) * ch ,
136
+ area -> x + to * cw + cw / 2.0 , area -> y + (yoffset + 2 ) * ch );
137
+
139
138
cairo_stroke (cr );
140
139
}
141
140
@@ -147,13 +146,13 @@ draw_paths_real(GitgCellRendererPath *self, cairo_t *cr, GdkRectangle *area, Git
147
146
static void
148
147
draw_top_paths (GitgCellRendererPath * self , cairo_t * cr , GdkRectangle * area )
149
148
{
150
- draw_paths_real (self , cr , area , self -> priv -> revision , TRUE, 0 );
149
+ draw_paths_real (self , cr , area , self -> priv -> revision , -1 );
151
150
}
152
151
153
152
static void
154
153
draw_bottom_paths (GitgCellRendererPath * self , cairo_t * cr , GdkRectangle * area )
155
154
{
156
- draw_paths_real (self , cr , area , self -> priv -> next_revision , FALSE, 1 );
155
+ draw_paths_real (self , cr , area , self -> priv -> next_revision , 1 );
157
156
}
158
157
159
158
static void
@@ -265,6 +264,10 @@ renderer_render(GtkCellRenderer *renderer, GdkDrawable *window, GtkWidget *widge
265
264
GitgCellRendererPath * self = GITG_CELL_RENDERER_PATH (renderer );
266
265
267
266
cairo_t * cr = gdk_cairo_create (window );
267
+
268
+ cairo_rectangle (cr , area -> x , area -> y , area -> width , area -> height );
269
+ cairo_clip (cr );
270
+
268
271
draw_paths (self , cr , area );
269
272
270
273
/* draw indicator */
0 commit comments