eric7/Preferences/ConfigurationPages/ShellPage.py

branch
eric7
changeset 8319
ea11a3948f40
parent 8318
962bce857696
child 8881
54e42bc2437a
equal deleted inserted replaced
8318:962bce857696 8319:ea11a3948f40
12 12
13 from .ConfigurationPageBase import ConfigurationPageBase 13 from .ConfigurationPageBase import ConfigurationPageBase
14 from .Ui_ShellPage import Ui_ShellPage 14 from .Ui_ShellPage import Ui_ShellPage
15 15
16 import Preferences 16 import Preferences
17
18 try:
19 MonospacedFontsOption = QFontDialog.FontDialogOption.MonospacedFonts
20 except AttributeError:
21 MonospacedFontsOption = QFontDialog.FontDialogOptions(0x10)
22 17
23 from QScintilla.Shell import ShellHistoryStyle 18 from QScintilla.Shell import ShellHistoryStyle
24 19
25 20
26 class ShellPage(ConfigurationPageBase, Ui_ShellPage): 21 class ShellPage(ConfigurationPageBase, Ui_ShellPage):
124 Private method used to select the font to be used as the monospaced 119 Private method used to select the font to be used as the monospaced
125 font. 120 font.
126 """ 121 """
127 self.monospacedFont = self.selectFont( 122 self.monospacedFont = self.selectFont(
128 self.monospacedFontSample, self.monospacedFont, 123 self.monospacedFontSample, self.monospacedFont,
129 options=MonospacedFontsOption) 124 options=QFontDialog.FontDialogOption.MonospacedFonts)
130 125
131 @pyqtSlot() 126 @pyqtSlot()
132 def on_linenumbersFontButton_clicked(self): 127 def on_linenumbersFontButton_clicked(self):
133 """ 128 """
134 Private method used to select the font for the editor margins. 129 Private method used to select the font for the editor margins.
135 """ 130 """
136 self.marginsFont = self.selectFont( 131 self.marginsFont = self.selectFont(
137 self.marginsFontSample, self.marginsFont, 132 self.marginsFontSample, self.marginsFont,
138 options=MonospacedFontsOption) 133 options=QFontDialog.FontDialogOption.MonospacedFonts)
139 134
140 def polishPage(self): 135 def polishPage(self):
141 """ 136 """
142 Public slot to perform some polishing actions. 137 Public slot to perform some polishing actions.
143 """ 138 """

eric ide

mercurial