Commits

Yuya Nishihara  committed 9b7fc10

import, strip: delegate size management of cslist to layout system

No reason to manage layout manually because 6ac3e92a38db just want to make
cslit fit to the entire cell.

  • Participants
  • Parent commits 58c55b3

Comments (0)

Files changed (2)

File tortoisehg/hgqt/thgimport.py

 
         ### patch list
         self.cslist = cslist.ChangesetList(self.repo)
-        self.cslistrow = cslistrow = 4
-        self.cslistcol = cslistcol = 1
-        grid.addWidget(self.cslist, cslistrow, cslistcol,
-                       Qt.AlignLeft | Qt.AlignTop)
+        cslistrow = 4
+        cslistcol = 1
+        grid.addWidget(self.cslist, cslistrow, cslistcol)
         grid.addWidget(QLabel(_('Preview:')), 3, 0, Qt.AlignLeft | Qt.AlignTop)
         statbox = QHBoxLayout()
         self.status = QLabel("")
         else:
             return super(ImportDialog, self).keyPressEvent(event)
 
-    def resizeEvent(self, event):
-        w = self.grid.cellRect(self.cslistrow, self.cslistcol).width()
-        h = self.grid.cellRect(self.cslistrow, self.cslistcol).height()
-        self.cslist.resize(w, h)
-
     def browsefiles(self):
         caption = _("Select patches")
         filelist = QFileDialog.getOpenFileNames(parent=self, caption=caption,

File tortoisehg/hgqt/thgstrip.py

 
         ### preview box, contained in scroll area, contains preview grid
         self.cslist = cslist.ChangesetList(self.repo)
-        self.cslistrow = cslistrow = 2
-        self.cslistcol = cslistcol = 1
-        grid.addWidget(self.cslist, cslistrow, cslistcol,
-                       Qt.AlignLeft | Qt.AlignTop)
+        cslistrow = 2
+        cslistcol = 1
+        grid.addWidget(self.cslist, cslistrow, cslistcol)
 
         ### options
         optbox = QVBoxLayout()
 
     ### Private Methods ###
 
-    def resizeEvent(self, event):
-        w = self.grid.cellRect(self.cslistrow, self.cslistcol).width()
-        h = self.grid.cellRect(self.cslistrow, self.cslistcol).height()
-        self.cslist.resize(w, h)
-
     def get_rev(self):
         """Return the integer revision number of the input or None"""
         revstr = hglib.fromunicode(self.rev_combo.currentText())