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

commit: replace QFormLayout with vbox of hbox

Looks better, wastes less space on a Mac.

Changeset 395ea7f94c1b

Parent 9d87820be79e

by Steve Borho

Changes to one file · Browse files at 395ea7f94c1b Showing diff from parent 9d87820be79e Diff from another changeset...

 
50
51
52
53
54
55
56
57
58
59
60
61
 
 
 
 
 
62
63
 
 
 
 
 
 
 
64
65
66
67
68
69
70
71
72
73
74
 
 
 
 
 
75
76
77
78
 
 
 
 
 
79
80
81
 
83
84
85
 
 
 
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
 
114
115
116
 
 
117
118
119
 
50
51
52
 
 
53
54
55
56
 
 
 
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
 
 
 
 
 
 
 
 
 
 
72
73
74
75
76
77
78
 
 
79
80
81
82
83
84
85
86
 
88
89
90
91
92
93
94
95
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
96
97
98
 
105
106
107
108
109
110
111
112
@@ -50,32 +50,37 @@
  self.stwidget.loadComplete.connect(lambda: self.loadComplete.emit())   self.msghistory = []   - SP = QSizePolicy -   layout = QVBoxLayout()   layout.setContentsMargins(0, 0, 0, 0)   layout.addWidget(self.stwidget)   self.setLayout(layout) - form = QFormLayout() - form.setVerticalSpacing(3) - form.setContentsMargins(3, 0, 9, 0) + + vbox = QVBoxLayout() + vbox.setMargin(0) + + hbox = QHBoxLayout()   repo = self.stwidget.repo   wctx = repo[None] + branchbutton = QPushButton(_('Branch: ') + + hglib.tounicode(wctx.branch())) + branchbutton.pressed.connect(self.branchOp) + self.branchbutton = branchbutton + self.branchop = None + hbox.addWidget(branchbutton) + self.buttonHBox = hbox   - usercombo = QComboBox() - usercombo.setEditable(True) - - w = QWidget() - l = QHBoxLayout() - l.setMargin(0) - w.setLayout(l) - l.addWidget(QLabel(_('Working Copy'))) - l.addStretch(1) - self.buttonHBox = l + msgcombo = MessageHistoryCombo() + self.connect(msgcombo, SIGNAL('activated(int)'), self.msgSelected) + hbox.addWidget(msgcombo, 1) + hbox.addSpacing(9) + vbox.addLayout(hbox, 0)     def addrow(s, w): - form.addRow("<b>%s</b>" % s, w) - addrow(_('Changeset:'), w) + hbox = QHBoxLayout() + hbox.addWidget(QLabel('<b>%s</b>' % s)) + hbox.addWidget(w, 1) + vbox.addLayout(hbox) + addrow(_('Changeset:'), QLabel(_('Working Copy')))   for ctx in repo.parents():   desc = format_desc(ctx.description(), 80)   fmt = "<span style='font-family:Courier'>%s(%s)</span> %s" @@ -83,25 +88,11 @@
  lbl = QLabel(ptext)   lbl.minimumSizeHint = lambda: QSize(0, 0)   addrow(_('Parent:'), lbl) + + usercombo = QComboBox() + usercombo.setEditable(True)   addrow(_('User:'), usercombo)   - vbox = QVBoxLayout() - vbox.addLayout(form, 0) - vbox.setMargin(0) - hbox = QHBoxLayout() - - branchbutton = QPushButton(_('Branch: ') + - hglib.tounicode(wctx.branch())) - branchbutton.pressed.connect(self.branchOp) - self.branchbutton = branchbutton - self.branchop = None - hbox.addWidget(branchbutton) - - msgcombo = MessageHistoryCombo() - self.connect(msgcombo, SIGNAL('activated(int)'), self.msgSelected) - hbox.addWidget(msgcombo, 1) - hbox.addSpacing(9) - vbox.addLayout(hbox, 0)   msgte = QPlainTextEdit()   msgte.setLineWrapMode(QPlainTextEdit.NoWrap)   msgfont = qtlib.getfont(self.stwidget.repo.ui, 'fontcomment') @@ -114,6 +105,8 @@
  self.customContextMenuRequested)   vbox.addWidget(msgte, 1)   upperframe = QFrame() + + SP = QSizePolicy   sp = SP(SP.Expanding, SP.Expanding)   sp.setHorizontalStretch(1)   upperframe.setSizePolicy(sp)