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

settings: connect to QFontDialog.currentFontChanged signals

Changeset bfff559a11ec

Parent 38e56e40368a

by Steve Borho

Changes to one file · Browse files at bfff559a11ec Showing diff from parent 38e56e40368a Diff from another changeset...

 
140
141
142
 
 
 
143
 
144
145
146
147
148
 
 
 
 
149
150
151
 
140
141
142
143
144
145
146
147
148
 
 
 
 
149
150
151
152
153
154
155
@@ -140,12 +140,16 @@
  self.setFixedWidth(ENTRY_WIDTH)     def on_clicked(self, checked): + def newFont(font): + self.setText(font.toString()) + thgf.setFont(font)   thgf = qtlib.getfont(self.fname) + origfont = self.currentFont() or thgf.font()   dlg = QFontDialog(self) - dlg.setCurrentFont(self.currentFont() or thgf.font()) - if dlg.exec_() == QDialog.Accepted: - thgf.setFont(dlg.selectedFont()) - self.setText(thgf.font().toString()) + dlg.currentFontChanged.connect(newFont) + font, isok = dlg.getFont(origfont, self) + self.setText(font.toString()) + thgf.setFont(font)     def currentFont(self):   """currently selected QFont if specified"""