Commits

Angel Ezquerra committed 27a0b27

revdetails: do not resize the revision description automatically

This makes it easier to reserve a given vertical space for the revision
description, while maximizing the amount of vertical space left for the diff
view.

The default message size (when TortoiseHgQt.ini does not exist yet) has been set
to 100.

Comments (0)

Files changed (1)

tortoisehg/hgqt/revdetails.py

 
         sp = SP(SP.Expanding, SP.Expanding)
         sp.setHorizontalStretch(0)
-        sp.setVerticalStretch(2)
+        sp.setVerticalStretch(0)
         sp.setHeightForWidth(self.message.sizePolicy().hasHeightForWidth())
         self.message.setSizePolicy(sp)
         self.message.setMinimumSize(QSize(0, 0))
+        self.message.sizeHint = lambda: QSize(0, 100)
         f = qtlib.getfont('fontcomment')
         self.message.setFont(f.font())
         f.changed.connect(self.forwardFont)
         self.fileview = HgFileView(self.repo, self.messagesplitter)
         sp = SP(SP.Expanding, SP.Expanding)
         sp.setHorizontalStretch(0)
-        sp.setVerticalStretch(5)
+        sp.setVerticalStretch(1)
         sp.setHeightForWidth(self.fileview.sizePolicy().hasHeightForWidth())
         self.fileview.setSizePolicy(sp)
         self.fileview.setMinimumSize(QSize(0, 0))