Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 1.9, 1.9.1, and 1.9.2

repomodel: curved lines on revision graph

Changeset 8a7af48f84ff

Parent bcabd9998abe

by George Marrows

Changes to one file · Browse files at 8a7af48f84ff Showing diff from parent bcabd9998abe Diff from another changeset...

 
339
340
341
 
 
 
 
 
342
343
344
345
346
347
 
349
350
351
352
 
 
 
 
 
 
 
 
 
353
354
355
 
339
340
341
342
343
344
345
346
347
 
 
348
349
350
 
352
353
354
 
355
356
357
358
359
360
361
362
363
364
365
366
@@ -339,9 +339,12 @@
  lpen = QPen(pen)   lpen.setColor(Qt.black)   painter.setPen(lpen) + for y1, y4, lines in ((dot_y, dot_y + h, gnode.bottomlines), + (dot_y - h, dot_y, gnode.toplines)): + y2 = y1 + 1 * (y4 - y1)/4 + ymid = (y1 + y4)/2 + y3 = y1 + 3 * (y4 - y1)/4   - for y1, y2, lines in ((0, h, gnode.bottomlines), - (-h, 0, gnode.toplines)):   for start, end, color in lines:   lpen = QPen(pen)   lpen.setColor(QColor(get_color(color))) @@ -349,7 +352,15 @@
  painter.setPen(lpen)   x1 = self.col2x(start)   x2 = self.col2x(end) - painter.drawLine(x1, dot_y + y1, x2, dot_y + y2) + path = QPainterPath() + path.moveTo(x1, y1) + path.cubicTo(x1, y2, + x1, y2, + (x1 + x2)/2, ymid) + path.cubicTo(x2, y3, + x2, y3, + x2, y4) + painter.drawPath(path)     dot_color = QColor(self.namedbranch_color(ctx.branch()))   dotcolor = QColor(dot_color)