Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 1.9.3, 2.0, and 2.0.1

stable chunks: add divider line between chunks

The color could probably be tweaked, but this is effective

Changeset a2d09dc6ee22

Parent fca7733a66cb

by Steve Borho

Changes to one file · Browse files at a2d09dc6ee22 Showing diff from parent fca7733a66cb Diff from another changeset...

 
464
465
466
 
467
468
 
469
470
 
471
472
473
 
586
587
588
 
589
590
591
 
593
594
595
 
 
596
597
598
599
600
601
 
602
603
604
 
464
465
466
467
468
469
470
471
 
472
473
474
475
 
588
589
590
591
592
593
594
 
596
597
598
599
600
601
602
603
604
605
 
606
607
608
609
@@ -464,10 +464,12 @@
  self.selected = self.sci.markerDefine(qsci.Plus, -1)   self.unselected = self.sci.markerDefine(qsci.Minus, -1)   self.vertical = self.sci.markerDefine(qsci.VerticalLine, -1) + self.divider = self.sci.markerDefine(qsci.Background, -1)   self.selcolor = self.sci.markerDefine(qsci.Background, -1)   self.sci.setMarkerBackgroundColor(QColor('#BBFFFF'), self.selcolor) + self.sci.setMarkerBackgroundColor(QColor('#AAAAAA'), self.divider)   mask = (1 << self.selected) | (1 << self.unselected) | \ - (1 << self.vertical) | (1 << self.selcolor) + (1 << self.vertical) | (1 << self.selcolor) | (1 << self.divider)   self.sci.setMarginMarkerMask(1, mask)     self.layout().addWidget(self.sci, 1) @@ -586,6 +588,7 @@
  chunk.write(buf)   chunk.lines = buf.getvalue().splitlines()   utext += [hglib.tounicode(l) for l in chunk.lines] + utext.append('')   self.sci.setText(u'\n'.join(utext))     start = 0 @@ -593,12 +596,14 @@
  for chunk in chunks[1:]:   chunk.lrange = (start, start+len(chunk.lines))   chunk.mline = start + len(chunk.lines)/2 + if start: + self.sci.markerAdd(start-1, self.divider)   for i in xrange(1,len(chunk.lines)-1):   if start + i == chunk.mline:   self.sci.markerAdd(chunk.mline, self.unselected)   else:   self.sci.markerAdd(start+i, self.vertical) - start += len(chunk.lines) + start += len(chunk.lines) + 1   self.origcontents = fd.olddata   self.countselected = 0   self.curchunks = chunks