Kiln » TortoiseHg » TortoiseHg
Clone URL:  
Pushed to one repository · View In Graph Contained in 1.9, 1.9.1, and 1.9.2

commit: add a splitter between commit widgets and doc frame

Set the splitter's initial position to the top frame's min height

Changeset 12e4da505d00

Parent 36370aa460f7

by Steve Borho

Changes to 2 files · Browse files at 12e4da505d00 Showing diff from parent 36370aa460f7 Diff from another changeset...

 
33
34
35
36
37
38
39
 
43
44
45
46
 
 
 
 
47
48
49
 
50
51
52
53
54
55
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
56
57
58
 
33
34
35
 
36
37
38
 
42
43
44
 
45
46
47
48
49
50
 
51
52
53
 
 
 
 
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
@@ -33,7 +33,6 @@
  layout = QVBoxLayout()   layout.addWidget(self.stwidget)   self.setLayout(layout) - vbox = self.stwidget.diffvbox   form = QFormLayout()   userle = QLineEdit()   form.addRow(_('Changeset:'), QLabel(_('Working Copy'))) @@ -43,16 +42,32 @@
  frame = QFrame()   frame.setLayout(form)   frame.setFrameStyle(QFrame.StyledPanel) - vbox.insertWidget(0, frame, 0) + + vbox = QVBoxLayout() + vbox.addWidget(frame, 0) + vbox.setMargin(0)   msgcombo = QComboBox()   msgcombo.addItem('Recent commit messages...') - vbox.insertWidget(1, msgcombo, 0) + vbox.addWidget(msgcombo, 0)   msgte = QTextEdit()   msgte.setAcceptRichText(False) - # TODO - # http://www.qtcentre.org/threads/9840-QTextEdit-auto-resize - vbox.insertWidget(2, msgte, 0) - vbox.setStretchFactor(msgte, 0) + vbox.addWidget(msgte, 1) + upperframe = QFrame() + upperframe.setLayout(vbox) + + self.split = QSplitter(Qt.Vertical) + # Add our widgets to the top of our splitter + self.split.addWidget(upperframe) + # Add status widget document frame below our splitter + # this reparents the docf from the status splitter + self.split.addWidget(self.stwidget.docf) + h = self.split.sizeHint().height() + mh = upperframe.minimumSizeHint().height() + self.split.setSizes([mh, h-mh]) + + # add our splitter where the docf used to be + self.stwidget.split.addWidget(self.split) +   # TODO add commit widgets   # branchop dialog   # Yuki's Mockup: http://bitbucket.org/kuy/thg-qt/wiki/Home
 
145
146
147
 
148
149
150
 
145
146
147
148
149
150
151
@@ -145,6 +145,7 @@
  vbox.setMargin(0)   docf = QFrame(split)   docf.setLayout(vbox) + self.docf = docf   hbox = QHBoxLayout()   hbox.setContentsMargins (5, 7, 0, 0)   self.fnamelabel = QLabel()