8 """ |
8 """ |
9 |
9 |
10 from PyQt6.Qsci import QsciScintillaBase |
10 from PyQt6.Qsci import QsciScintillaBase |
11 from PyQt6.QtCore import QCoreApplication, QObject |
11 from PyQt6.QtCore import QCoreApplication, QObject |
12 |
12 |
13 from eric7 import Globals, Preferences |
13 from eric7 import Preferences |
14 from eric7.QScintilla import Lexers |
14 from eric7.QScintilla import Lexers |
|
15 from eric7.SystemUtilities import OSUtilities |
15 |
16 |
16 |
17 |
17 class PreferencesLexerError(Exception): |
18 class PreferencesLexerError(Exception): |
18 """ |
19 """ |
19 Class defining a special error for the PreferencesLexer class. |
20 Class defining a special error for the PreferencesLexer class. |
81 lexer language |
82 lexer language |
82 """ |
83 """ |
83 super().__init__(parent) |
84 super().__init__(parent) |
84 |
85 |
85 # These default font families are taken from eric7.QScintilla |
86 # These default font families are taken from eric7.QScintilla |
86 if Globals.isWindowsPlatform(): |
87 if OSUtilities.isWindowsPlatform(): |
87 self.__defaultFontFamily = "Courier New" |
88 self.__defaultFontFamily = "Courier New" |
88 elif Globals.isMacPlatform(): |
89 elif OSUtilities.isMacPlatform(): |
89 self.__defaultFontFamily = "Courier" |
90 self.__defaultFontFamily = "Courier" |
90 else: |
91 else: |
91 self.__defaultFontFamily = "Bitstream Vera Sans Mono" |
92 self.__defaultFontFamily = "Bitstream Vera Sans Mono" |
92 |
93 |
93 # instantiate a lexer object for the given language |
94 # instantiate a lexer object for the given language |