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

repomodel: working directory parents have outline circles

Changeset 30bfa04af71c

Parent cff3b1e77a72

by George Marrows

Changes to one file · Browse files at 30bfa04af71c Showing diff from parent cff3b1e77a72 Diff from another changeset...

 
293
294
295
296
 
297
298
299
 
320
321
322
323
324
325
326
327
328
329
330
 
362
363
364
 
 
 
365
366
367
368
369
370
 
 
 
371
372
373
374
375
 
 
 
 
 
 
 
 
 
 
376
377
 
 
 
 
 
 
 
 
378
379
380
381
382
 
383
384
385
386
387
388
389
390
391
 
293
294
295
 
296
297
298
299
 
320
321
322
 
323
324
325
 
326
327
328
 
360
361
362
363
364
365
366
367
 
368
369
 
370
371
372
373
 
 
 
 
374
375
376
377
378
379
380
381
382
383
384
 
385
386
387
388
389
390
391
392
393
 
 
 
 
394
395
 
 
 
 
 
396
397
398
@@ -293,7 +293,7 @@
  return self._branch_colors[branch]     def col2x(self, col): - return 2 * self.dot_radius * col + self.dot_radius/2 + 3 + return 2 * self.dot_radius * col + self.dot_radius/2 + 8     @datacached   def data(self, index, role): @@ -320,11 +320,9 @@
  return QVariant(QColor(self.namedbranch_color(ctx.branch())))   elif role == Qt.DecorationRole:   if column == 'Log': - radius = self.dot_radius   w = self.col2x(gnode.cols) + 10   h = self.rowheight   - dot_x = self.col2x(gnode.x) - radius / 2   dot_y = h / 2     pix = QPixmap(w, h) @@ -362,30 +360,39 @@
  x2, y4)   painter.drawPath(path)   + # Draw node + # - rev / mqpatch + # - wd parent   dot_color = QColor(self.namedbranch_color(ctx.branch()))   dotcolor = QColor(dot_color).lighter() - penradius = 1   pencolor = dotcolor.darker()   - dot_y = (h/2) - radius / 2 + pen = QPen(pencolor) + pen.setWidthF(1.5) + painter.setPen(pen)   - painter.setBrush(dotcolor) - pen = QPen(pencolor) - pen.setWidth(penradius) - painter.setPen(pen) + radius = self.dot_radius + centre_x = self.col2x(gnode.x) + centre_y = h/2 + + def circle(r): + rect = QRectF(centre_x - r, + centre_y - r, + 2 * r, 2 * r) + painter.drawEllipse(rect) +   tags = set(ctx.tags()) - icn = None + if tags.intersection(self.mqueues): + pass + else: + if gnode.rev in self.wd_revs: + painter.setBrush(QColor(255,255,255,255)) + circle(0.9 * radius) + painter.setBrush(dotcolor) + circle(0.5 * radius)   - if gnode.rev in self.wd_revs: - icn = geticon('clean') - elif tags.intersection(self.mqueues): - icn = geticon('mqpatch') + painter.end()   - if icn: - icn.paint(painter, dot_x-5, dot_y-5, 17, 17) - else: - painter.drawEllipse(dot_x, dot_y, radius, radius) - painter.end()   ret = QVariant(pix)   return ret   return nullvariant