16 |
16 |
17 from .ConfigurationPageBase import ConfigurationPageBase |
17 from .ConfigurationPageBase import ConfigurationPageBase |
18 from .Ui_EditorStylesPage import Ui_EditorStylesPage |
18 from .Ui_EditorStylesPage import Ui_EditorStylesPage |
19 |
19 |
20 import Preferences |
20 import Preferences |
|
21 |
|
22 try: |
|
23 MonospacedFontsOption = QFontDialog.MonospacedFonts |
|
24 except AttributeError: |
|
25 MonospacedFontsOption = QFontDialog.FontDialogOptions(0x10) |
21 |
26 |
22 |
27 |
23 class EditorStylesPage(ConfigurationPageBase, Ui_EditorStylesPage): |
28 class EditorStylesPage(ConfigurationPageBase, Ui_EditorStylesPage): |
24 """ |
29 """ |
25 Class implementing the Editor Styles configuration page. |
30 Class implementing the Editor Styles configuration page. |
346 """ |
351 """ |
347 Private method used to select the font for the editor margins. |
352 Private method used to select the font for the editor margins. |
348 """ |
353 """ |
349 self.marginsFont = self.selectFont( |
354 self.marginsFont = self.selectFont( |
350 self.marginsFontSample, self.marginsFont, |
355 self.marginsFontSample, self.marginsFont, |
351 options=QFontDialog.MonospacedFonts) |
356 options=MonospacedFontsOption) |
352 |
357 |
353 @pyqtSlot() |
358 @pyqtSlot() |
354 def on_defaultFontButton_clicked(self): |
359 def on_defaultFontButton_clicked(self): |
355 """ |
360 """ |
356 Private method used to select the default font for the editor. |
361 Private method used to select the default font for the editor. |
364 Private method used to select the font to be used as the monospaced |
369 Private method used to select the font to be used as the monospaced |
365 font. |
370 font. |
366 """ |
371 """ |
367 self.monospacedFont = self.selectFont( |
372 self.monospacedFont = self.selectFont( |
368 self.monospacedFontSample, self.monospacedFont, |
373 self.monospacedFontSample, self.monospacedFont, |
369 options=QFontDialog.MonospacedFonts) |
374 options=MonospacedFontsOption) |
370 |
375 |
371 def polishPage(self): |
376 def polishPage(self): |
372 """ |
377 """ |
373 Public slot to perform some polishing actions. |
378 Public slot to perform some polishing actions. |
374 """ |
379 """ |