Commits

Yuya Nishihara committed 1208bdf

repoview: specify alignment of horizontal header as view's default

Comments (0)

Files changed (2)

tortoisehg/hgqt/repomodel.py

         if orientation == Qt.Horizontal:
             if role == Qt.DisplayRole:
                 return QVariant(self._allcolnames[self._columns[section]])
-            if role == Qt.TextAlignmentRole:
-                return QVariant(Qt.AlignLeft)
         return nullvariant
 
     def rowFromRev(self, rev):

tortoisehg/hgqt/repoview.py

         vh.setDefaultSectionSize(20)
 
         header = self.horizontalHeader()
+        header.setDefaultAlignment(Qt.AlignLeft)
         header.setHighlightSections(False)
         header.setContextMenuPolicy(Qt.CustomContextMenu)
         header.customContextMenuRequested.connect(self.headerMenuRequest)