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

cmdui: use stylesheet instead of <pre> tags

Changeset d3960278281b

Parent 081068bed495

by Steve Borho

Changes to 2 files · Browse files at d3960278281b Showing diff from parent 081068bed495 Diff from another changeset...

 
43
44
45
 
46
47
48
 
113
114
115
116
117
118
 
119
120
121
 
 
122
123
124
125
126
127
 
 
128
129
130
131
132
 
43
44
45
46
47
48
49
 
114
115
116
 
117
 
118
119
120
121
122
123
124
 
125
126
127
128
129
130
131
 
132
133
134
@@ -43,6 +43,7 @@
  # command output area   self.log_text = QTextEdit()   self.log_text.setReadOnly(True) + self.log_text.document().setDefaultStyleSheet(qtlib.thgstylesheet)   grid.addWidget(self.log_text, 2, 0, 5, 0)   grid.setRowStretch(2, 1)   @@ -113,20 +114,21 @@
  self.close_btn.setFocus()     def append_output(self, msg, style=''): - msg = hglib.tounicode(msg)   msg = msg.replace('\n', '<br />') - self.log_text.insertHtml('<pre style="%s">%s</pre>' % (style, msg)) + self.log_text.insertHtml('<font style="%s">%s</pre>' % (style, msg))     def output_received(self, wrapper):   msg, label = wrapper.data + msg = hglib.tounicode(msg) + msg = Qt.escape(msg)   style = qtlib.geteffect(label) - style += ';font-size: 9pt'   self.append_output(msg, style)     def error_received(self, wrapper):   msg, label = wrapper.data + msg = hglib.tounicode(msg) + msg = Qt.escape(msg)   style = qtlib.geteffect(label) - style += ';font-size: 9pt'   self.append_output(msg, style)     def clear_progress(self):
 
21
22
23
24
 
25
26
27
 
21
22
23
 
24
25
26
27
@@ -21,7 +21,7 @@
  'underline': 'text-decoration: underline',  }   -thgstylesheet = '* { white-space: pre; font-family: monospace; }' +thgstylesheet = '* { white-space: pre; font-family: monospace; font-size: 9pt; }'    def configstyles(ui):   # extensions may provide more labels and default effects