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

stable repoview: reimplement sizeHintForColumn() (refs #156)

With this, double-clicking column separator resizes columns by using the same
strategy as resizeColumns().

Changeset 2afbe5d0467f

Parent 4268fec8a0ff

by Yuya Nishihara

Changes to one file · Browse files at 2afbe5d0467f Showing diff from parent 4268fec8a0ff Diff from another changeset...

 
115
116
117
 
 
 
118
119
120
 
133
134
135
136
 
137
138
139
 
115
116
117
118
119
120
121
122
123
 
136
137
138
 
139
140
141
142
@@ -115,6 +115,9 @@
  for c, w in enumerate(self._columnWidthHints()):   self.setColumnWidth(c, w)   + def sizeHintForColumn(self, column): + return self._columnWidthHints()[column] +   def _columnWidthHints(self):   """Return list of recommended widths of all columns"""   model = self.model() @@ -133,7 +136,7 @@
  w = fontm.width(hglib.tounicode(str(w)) + 'w')   widths[c] = w   else: - w = self.sizeHintForColumn(c) + w = super(HgRepoView, self).sizeHintForColumn(c)   widths[c] = w   col1_width -= widths[c]   col1_width = max(col1_width, 600)