Preferences/ConfigurationPages/ShellPage.py

changeset 4676
c65b401b775e
parent 4674
41f716db325e
child 5389
9b1c800daff3
equal deleted inserted replaced
4675:adb8882de5af 4676:c65b401b775e
14 14
15 from .ConfigurationPageBase import ConfigurationPageBase 15 from .ConfigurationPageBase import ConfigurationPageBase
16 from .Ui_ShellPage import Ui_ShellPage 16 from .Ui_ShellPage import Ui_ShellPage
17 17
18 import Preferences 18 import Preferences
19
20 try:
21 MonospacedFontsOption = QFontDialog.MonospacedFonts
22 except AttributeError:
23 MonospacedFontsOption = QFontDialog.FontDialogOptions(0x10)
19 24
20 25
21 class ShellPage(ConfigurationPageBase, Ui_ShellPage): 26 class ShellPage(ConfigurationPageBase, Ui_ShellPage):
22 """ 27 """
23 Class implementing the Shell configuration page. 28 Class implementing the Shell configuration page.
91 Private method used to select the font to be used as the monospaced 96 Private method used to select the font to be used as the monospaced
92 font. 97 font.
93 """ 98 """
94 self.monospacedFont = self.selectFont( 99 self.monospacedFont = self.selectFont(
95 self.monospacedFontSample, self.monospacedFont, 100 self.monospacedFontSample, self.monospacedFont,
96 options=QFontDialog.MonospacedFonts) 101 options=MonospacedFontsOption)
97 102
98 @pyqtSlot() 103 @pyqtSlot()
99 def on_linenumbersFontButton_clicked(self): 104 def on_linenumbersFontButton_clicked(self):
100 """ 105 """
101 Private method used to select the font for the editor margins. 106 Private method used to select the font for the editor margins.
102 """ 107 """
103 self.marginsFont = self.selectFont( 108 self.marginsFont = self.selectFont(
104 self.marginsFontSample, self.marginsFont, 109 self.marginsFontSample, self.marginsFont,
105 options=QFontDialog.MonospacedFonts) 110 options=MonospacedFontsOption)
106 111
107 def polishPage(self): 112 def polishPage(self):
108 """ 113 """
109 Public slot to perform some polishing actions. 114 Public slot to perform some polishing actions.
110 """ 115 """

eric ide

mercurial