src/eric7/Preferences/ConfigurationPages/EditorStylesPage.py

Wed, 20 Dec 2023 14:58:58 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Wed, 20 Dec 2023 14:58:58 +0100
branch
eric7
changeset 10428
a071d4065202
parent 10303
ee1aadab1215
child 10439
21c28b0f9e41
permissions
-rw-r--r--

Converted some source code documentation to the new style.

0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
1 # -*- coding: utf-8 -*-
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
2
9653
e67609152c5e Updated copyright for 2023.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9482
diff changeset
3 # Copyright (c) 2006 - 2023 Detlev Offenbach <detlev@die-offenbachs.de>
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
4 #
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
5
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
6 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
7 Module implementing the Editor Styles configuration page.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
8 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
9
9473
3f23dbf37dbe Resorted the import statements using isort.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9413
diff changeset
10 from PyQt6.Qsci import QsciScintilla
8318
962bce857696 Replaced all imports of PyQt5 to PyQt6 and started to replace code using obsoleted methods and adapt to the PyQt6 enum usage.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8312
diff changeset
11 from PyQt6.QtCore import pyqtSlot
8854
68c67538da4e Changed some more widgets to work with style sheets instead of manipulating the palette.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8322
diff changeset
12 from PyQt6.QtGui import QColor
8318
962bce857696 Replaced all imports of PyQt5 to PyQt6 and started to replace code using obsoleted methods and adapt to the PyQt6 enum usage.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8312
diff changeset
13 from PyQt6.QtWidgets import QColorDialog, QFontDialog
9473
3f23dbf37dbe Resorted the import statements using isort.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9413
diff changeset
14
3f23dbf37dbe Resorted the import statements using isort.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9413
diff changeset
15 from eric7 import Preferences
9482
a2bc06a54d9d Corrected/acknowledged some bad import style and removed some obsolete code.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9473
diff changeset
16 from eric7.QScintilla.QsciScintillaCompat import QsciScintillaCompat
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
17
12
1d8dd9706f46 First commit after changing to Python 3.1.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7
diff changeset
18 from .ConfigurationPageBase import ConfigurationPageBase
1d8dd9706f46 First commit after changing to Python 3.1.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7
diff changeset
19 from .Ui_EditorStylesPage import Ui_EditorStylesPage
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
20
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
21
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
22 class EditorStylesPage(ConfigurationPageBase, Ui_EditorStylesPage):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
23 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
24 Class implementing the Editor Styles configuration page.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
25 """
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
26
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
27 def __init__(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
28 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
29 Constructor
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
30 """
8218
7c09585bd960 Applied some more code simplifications suggested by the new Simplify checker (super(Foo, self) => super()).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8143
diff changeset
31 super().__init__()
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
32 self.setupUi(self)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
33 self.setObjectName("EditorStylesPage")
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
34
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
35 self.foldStyles = [
8322
b422b4e77d19 Continued porting eric to PyQt6.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8319
diff changeset
36 QsciScintilla.FoldStyle.PlainFoldStyle.value,
b422b4e77d19 Continued porting eric to PyQt6.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8319
diff changeset
37 QsciScintilla.FoldStyle.CircledFoldStyle.value,
b422b4e77d19 Continued porting eric to PyQt6.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8319
diff changeset
38 QsciScintilla.FoldStyle.BoxedFoldStyle.value,
b422b4e77d19 Continued porting eric to PyQt6.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8319
diff changeset
39 QsciScintilla.FoldStyle.CircledTreeFoldStyle.value,
b422b4e77d19 Continued porting eric to PyQt6.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8319
diff changeset
40 QsciScintilla.FoldStyle.BoxedTreeFoldStyle.value,
b422b4e77d19 Continued porting eric to PyQt6.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8319
diff changeset
41 # the below ones are not (yet) defined in QsciScintilla
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
42 QsciScintillaCompat.ArrowFoldStyle,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
43 QsciScintillaCompat.ArrowTreeFoldStyle,
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
44 ]
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
45
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
46 self.edgeModes = [
8143
2c730d5fd177 Changed the use of PyQt enums because the way they were used previously is deprecated since two years and replaced some deprecated Qt stuff.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7923
diff changeset
47 QsciScintilla.EdgeMode.EdgeNone,
2c730d5fd177 Changed the use of PyQt enums because the way they were used previously is deprecated since two years and replaced some deprecated Qt stuff.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7923
diff changeset
48 QsciScintilla.EdgeMode.EdgeLine,
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
49 QsciScintilla.EdgeMode.EdgeBackground,
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
50 ]
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
51
2905
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
52 self.wrapModeComboBox.addItem(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
53 self.tr("Disabled"), QsciScintilla.WrapMode.WrapNone
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
54 )
2905
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
55 self.wrapModeComboBox.addItem(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
56 self.tr("Word Boundary"), QsciScintilla.WrapMode.WrapWord
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
57 )
2905
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
58 self.wrapModeComboBox.addItem(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
59 self.tr("Character Boundary"), QsciScintilla.WrapMode.WrapCharacter
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
60 )
2905
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
61 self.wrapVisualComboBox.addItem(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
62 self.tr("No Indicator"), QsciScintilla.WrapVisualFlag.WrapFlagNone
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
63 )
2905
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
64 self.wrapVisualComboBox.addItem(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
65 self.tr("Indicator by Text"), QsciScintilla.WrapVisualFlag.WrapFlagByText
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
66 )
2905
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
67 self.wrapVisualComboBox.addItem(
8143
2c730d5fd177 Changed the use of PyQt enums because the way they were used previously is deprecated since two years and replaced some deprecated Qt stuff.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7923
diff changeset
68 self.tr("Indicator by Margin"),
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
69 QsciScintilla.WrapVisualFlag.WrapFlagByBorder,
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
70 )
7202
d2f2a1fe0129 Modified sources to be in line with the minimum QScintilla requirement (v 2.9.0).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6942
diff changeset
71 self.wrapVisualComboBox.addItem(
d2f2a1fe0129 Modified sources to be in line with the minimum QScintilla requirement (v 2.9.0).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6942
diff changeset
72 self.tr("Indicator in Line Number Margin"),
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
73 QsciScintilla.WrapVisualFlag.WrapFlagInMargin,
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
74 )
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
75
6842
c83dcb7c6147 Editor, MiniEditor: added capability to configure the subline indentation for wrapped lines.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6648
diff changeset
76 self.wrapIndentComboBox.addItem(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
77 self.tr("Fixed"), QsciScintilla.WrapIndentMode.WrapIndentFixed
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
78 )
6842
c83dcb7c6147 Editor, MiniEditor: added capability to configure the subline indentation for wrapped lines.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6648
diff changeset
79 self.wrapIndentComboBox.addItem(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
80 self.tr("Aligned"), QsciScintilla.WrapIndentMode.WrapIndentSame
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
81 )
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
82 self.wrapIndentComboBox.addItem(
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
83 self.tr("Aligned plus One"), QsciScintilla.WrapIndentMode.WrapIndentIndented
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
84 )
7202
d2f2a1fe0129 Modified sources to be in line with the minimum QScintilla requirement (v 2.9.0).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6942
diff changeset
85 self.wrapIndentComboBox.addItem(
d2f2a1fe0129 Modified sources to be in line with the minimum QScintilla requirement (v 2.9.0).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6942
diff changeset
86 self.tr("Aligned plus Two"),
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
87 QsciScintilla.WrapIndentMode.WrapIndentDeeplyIndented,
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
88 )
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
89
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
90 # set initial values
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
91 try:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
92 self.foldingStyleComboBox.setCurrentIndex(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
93 self.foldStyles.index(Preferences.getEditor("FoldingStyle"))
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
94 )
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
95 except ValueError:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
96 self.foldingStyleComboBox.setCurrentIndex(0)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
97 self.marginsFont = Preferences.getEditorOtherFonts("MarginsFont")
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
98 self.marginsFontSample.setFont(self.marginsFont)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
99 self.defaultFont = Preferences.getEditorOtherFonts("DefaultFont")
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
100 self.defaultFontSample.setFont(self.defaultFont)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
101 self.monospacedFont = Preferences.getEditorOtherFonts("MonospacedFont")
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
102 self.monospacedFontSample.setFont(self.monospacedFont)
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
103 self.monospacedCheckBox.setChecked(Preferences.getEditor("UseMonospacedFont"))
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
104 self.linenoCheckBox.setChecked(Preferences.getEditor("LinenoMargin"))
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
105 self.foldingCheckBox.setChecked(Preferences.getEditor("FoldingMargin"))
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
106
564
b3d966393ba9 Did some code cleanup.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 342
diff changeset
107 self.caretlineVisibleCheckBox.setChecked(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
108 Preferences.getEditor("CaretLineVisible")
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
109 )
3067
8fd7ae10de2b Implemented support for the new QScintilla feature to always highlight the caret line.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2964
diff changeset
110 self.caretlineAlwaysVisibleCheckBox.setChecked(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
111 Preferences.getEditor("CaretLineAlwaysVisible")
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
112 )
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
113 self.caretWidthSpinBox.setValue(Preferences.getEditor("CaretWidth"))
6843
5e1afd1577b9 Editor: added these capabilities
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6842
diff changeset
114 self.caretlineFrameWidthSpinBox.setValue(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
115 Preferences.getEditor("CaretLineFrameWidth")
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
116 )
564
b3d966393ba9 Did some code cleanup.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 342
diff changeset
117 self.colourizeSelTextCheckBox.setChecked(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
118 Preferences.getEditor("ColourizeSelText")
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
119 )
564
b3d966393ba9 Did some code cleanup.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 342
diff changeset
120 self.customSelColourCheckBox.setChecked(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
121 Preferences.getEditor("CustomSelectionColours")
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
122 )
564
b3d966393ba9 Did some code cleanup.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 342
diff changeset
123 self.extentSelEolCheckBox.setChecked(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
124 Preferences.getEditor("ExtendSelectionToEol")
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
125 )
5733
aed3e558407f Reintroduced the highlighting of current instruction line and the error line using colored background. It is configurable whether to use these backgrounds or the arrows.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5706
diff changeset
126 self.debugMarkerBackgroundCheckBox.setChecked(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
127 Preferences.getEditor("LineMarkersBackground")
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
128 )
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
129
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
130 self.initColour(
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
131 "CaretForeground", self.caretForegroundButton, Preferences.getEditorColour
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
132 )
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
133 self.initColour(
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
134 "CaretLineBackground",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
135 self.caretlineBackgroundButton,
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
136 Preferences.getEditorColour,
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
137 hasAlpha=True,
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
138 )
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
139 self.initColour(
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
140 "SelectionForeground",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
141 self.selectionForegroundButton,
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
142 Preferences.getEditorColour,
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
143 )
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
144 self.initColour(
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
145 "SelectionBackground",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
146 self.selectionBackgroundButton,
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
147 Preferences.getEditorColour,
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
148 hasAlpha=True,
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
149 )
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
150 self.initColour(
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
151 "CurrentMarker",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
152 self.currentLineMarkerButton,
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
153 Preferences.getEditorColour,
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
154 hasAlpha=True,
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
155 )
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
156 self.initColour(
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
157 "ErrorMarker",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
158 self.errorMarkerButton,
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
159 Preferences.getEditorColour,
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
160 hasAlpha=True,
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
161 )
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
162 self.initColour(
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
163 "MarginsForeground",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
164 self.marginsForegroundButton,
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
165 Preferences.getEditorColour,
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
166 )
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
167 self.initColour(
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
168 "MarginsBackground",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
169 self.marginsBackgroundButton,
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
170 Preferences.getEditorColour,
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
171 )
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
172 self.initColour(
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
173 "FoldmarginBackground",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
174 self.foldmarginBackgroundButton,
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
175 Preferences.getEditorColour,
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
176 )
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
177 self.initColour(
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
178 "FoldMarkersForeground",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
179 self.foldmarkersForegroundButton,
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
180 Preferences.getEditorColour,
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
181 )
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
182 self.initColour(
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
183 "FoldMarkersBackground",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
184 self.foldmarkersBackgroundButton,
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
185 Preferences.getEditorColour,
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
186 )
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
187
2230
2b1b9265156c Optimized the colour selection code of configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2164
diff changeset
188 self.editorColours = {}
7263
c1af2e327675 Continued to resolve code style issue M841.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7229
diff changeset
189 self.editorColours["AnnotationsWarningForeground"] = QColor(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
190 Preferences.getEditorColour("AnnotationsWarningForeground")
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
191 )
7263
c1af2e327675 Continued to resolve code style issue M841.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7229
diff changeset
192 self.editorColours["AnnotationsWarningBackground"] = QColor(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
193 Preferences.getEditorColour("AnnotationsWarningBackground")
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
194 )
7263
c1af2e327675 Continued to resolve code style issue M841.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7229
diff changeset
195 self.editorColours["AnnotationsErrorForeground"] = QColor(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
196 Preferences.getEditorColour("AnnotationsErrorForeground")
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
197 )
7263
c1af2e327675 Continued to resolve code style issue M841.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7229
diff changeset
198 self.editorColours["AnnotationsErrorBackground"] = QColor(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
199 Preferences.getEditorColour("AnnotationsErrorBackground")
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
200 )
7263
c1af2e327675 Continued to resolve code style issue M841.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7229
diff changeset
201 self.editorColours["AnnotationsStyleForeground"] = QColor(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
202 Preferences.getEditorColour("AnnotationsStyleForeground")
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
203 )
7263
c1af2e327675 Continued to resolve code style issue M841.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7229
diff changeset
204 self.editorColours["AnnotationsStyleBackground"] = QColor(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
205 Preferences.getEditorColour("AnnotationsStyleBackground")
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
206 )
10279
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 10135
diff changeset
207 self.editorColours["AnnotationsInfoForeground"] = QColor(
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 10135
diff changeset
208 Preferences.getEditorColour("AnnotationsInfoForeground")
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 10135
diff changeset
209 )
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 10135
diff changeset
210 self.editorColours["AnnotationsInfoBackground"] = QColor(
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 10135
diff changeset
211 Preferences.getEditorColour("AnnotationsInfoBackground")
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 10135
diff changeset
212 )
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
213
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
214 self.eolCheckBox.setChecked(Preferences.getEditor("ShowEOL"))
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
215 self.wrapModeComboBox.setCurrentIndex(
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
216 self.wrapModeComboBox.findData(Preferences.getEditor("WrapLongLinesMode"))
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
217 )
2905
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
218 self.wrapVisualComboBox.setCurrentIndex(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
219 self.wrapVisualComboBox.findData(Preferences.getEditor("WrapVisualFlag"))
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
220 )
6842
c83dcb7c6147 Editor, MiniEditor: added capability to configure the subline indentation for wrapped lines.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6648
diff changeset
221 self.wrapIndentComboBox.setCurrentIndex(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
222 self.wrapIndentComboBox.findData(Preferences.getEditor("WrapIndentMode"))
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
223 )
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
224 self.wrapStartIndentSpinBox.setValue(Preferences.getEditor("WrapStartIndent"))
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
225
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
226 self.edgeModeCombo.setCurrentIndex(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
227 self.edgeModes.index(Preferences.getEditor("EdgeMode"))
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
228 )
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
229 self.edgeLineColumnSlider.setValue(Preferences.getEditor("EdgeColumn"))
2905
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
230 self.initColour(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
231 "Edge", self.edgeBackgroundColorButton, Preferences.getEditorColour
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
232 )
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
233
564
b3d966393ba9 Did some code cleanup.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 342
diff changeset
234 self.bracehighlightingCheckBox.setChecked(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
235 Preferences.getEditor("BraceHighlighting")
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
236 )
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
237 self.initColour(
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
238 "MatchingBrace", self.matchingBracesButton, Preferences.getEditorColour
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
239 )
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
240 self.initColour(
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
241 "MatchingBraceBack",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
242 self.matchingBracesBackButton,
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
243 Preferences.getEditorColour,
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
244 )
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
245 self.initColour(
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
246 "NonmatchingBrace",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
247 self.nonmatchingBracesButton,
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
248 Preferences.getEditorColour,
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
249 )
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
250 self.initColour(
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
251 "NonmatchingBraceBack",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
252 self.nonmatchingBracesBackButton,
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
253 Preferences.getEditorColour,
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
254 )
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
255
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
256 self.zoomfactorSlider.setValue(Preferences.getEditor("ZoomFactor"))
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
257
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
258 self.whitespaceCheckBox.setChecked(Preferences.getEditor("ShowWhitespace"))
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
259 self.whitespaceSizeSpinBox.setValue(Preferences.getEditor("WhitespaceSize"))
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
260 self.initColour(
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
261 "WhitespaceForeground",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
262 self.whitespaceForegroundButton,
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
263 Preferences.getEditorColour,
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
264 )
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
265 self.initColour(
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
266 "WhitespaceBackground",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
267 self.whitespaceBackgroundButton,
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
268 Preferences.getEditorColour,
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
269 )
939
10d3a201cd27 Added configuration options for visible whitespace (as of QScintilla 2.5).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 791
diff changeset
270 if not hasattr(QsciScintilla, "setWhitespaceForegroundColor"):
10d3a201cd27 Added configuration options for visible whitespace (as of QScintilla 2.5).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 791
diff changeset
271 self.whitespaceSizeSpinBox.setEnabled(False)
10d3a201cd27 Added configuration options for visible whitespace (as of QScintilla 2.5).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 791
diff changeset
272 self.whitespaceForegroundButton.setEnabled(False)
10d3a201cd27 Added configuration options for visible whitespace (as of QScintilla 2.5).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 791
diff changeset
273 self.whitespaceBackgroundButton.setEnabled(False)
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
274
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
275 self.miniMenuCheckBox.setChecked(Preferences.getEditor("MiniContextMenu"))
5416
16366120b523 Added an option to hide the format buttons bar, if formatting is not supported for the editor text type (only supported for HTML, Markdown and reStructured Text).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5389
diff changeset
276 self.hideFormatButtonsCheckBox.setChecked(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
277 Preferences.getEditor("HideFormatButtons")
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
278 )
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
279
729
090203934c19 Finished implementing the annotations support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
280 self.enableAnnotationsCheckBox.setChecked(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
281 Preferences.getEditor("AnnotationsEnabled")
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
282 )
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
283
1566
0cb791cc631a Fixed the issue where a non matching background was shown in the editor for lines below the end of the text, if a lexer with a non-standard background was set.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1509
diff changeset
284 self.editAreaOverrideCheckBox.setChecked(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
285 Preferences.getEditor("OverrideEditAreaColours")
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
286 )
2905
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
287 self.initColour(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
288 "EditAreaForeground",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
289 self.editAreaForegroundButton,
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
290 Preferences.getEditorColour,
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
291 )
2905
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
292 self.initColour(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
293 "EditAreaBackground",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
294 self.editAreaBackgroundButton,
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
295 Preferences.getEditorColour,
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
296 )
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
297
2162
4627e6ea7b6b Added capability to mark changed lines and to navigate between them to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1566
diff changeset
298 self.enableChangeTraceCheckBox.setChecked(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
299 Preferences.getEditor("OnlineChangeTrace")
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
300 )
2162
4627e6ea7b6b Added capability to mark changed lines and to navigate between them to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 1566
diff changeset
301 self.changeTraceTimeoutSpinBox.setValue(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
302 Preferences.getEditor("OnlineChangeTraceInterval")
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
303 )
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
304 self.initColour(
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
305 "OnlineChangeTraceMarkerUnsaved",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
306 self.changeMarkerUnsavedColorButton,
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
307 Preferences.getEditorColour,
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
308 )
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
309 self.initColour(
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
310 "OnlineChangeTraceMarkerSaved",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
311 self.changeMarkerSavedColorButton,
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
312 Preferences.getEditorColour,
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
313 )
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
314
6278
13fd8759f981 Editor, E5MapWidget: added a configuration option (Editor->Style page) to show the marker map on the left or right of the editor
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6111
diff changeset
315 self.markerMapRightCheckBox.setChecked(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
316 Preferences.getEditor("ShowMarkerMapOnRight")
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
317 )
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
318 self.initColour(
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
319 "BookmarksMap", self.bookmarksMapButton, Preferences.getEditorColour
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
320 )
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
321 self.initColour("ErrorsMap", self.errorsMapButton, Preferences.getEditorColour)
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
322 self.initColour(
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
323 "WarningsMap", self.warningsMapButton, Preferences.getEditorColour
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
324 )
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
325 self.initColour(
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
326 "BreakpointsMap", self.breakpointsMapButton, Preferences.getEditorColour
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
327 )
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
328 self.initColour("TasksMap", self.tasksMapButton, Preferences.getEditorColour)
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
329 self.initColour(
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
330 "CoverageMap", self.coverageMapButton, Preferences.getEditorColour
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
331 )
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
332 self.initColour(
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
333 "ChangesMap", self.changesMapButton, Preferences.getEditorColour
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
334 )
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
335 self.initColour(
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
336 "CurrentMap", self.currentMapButton, Preferences.getEditorColour
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
337 )
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
338 self.initColour(
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
339 "SearchMarkersMap", self.searchMarkerMapButton, Preferences.getEditorColour
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
340 )
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
341 self.initColour(
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
342 "VcsConflictMarkersMap",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
343 self.conflictMarkerMapButton,
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
344 Preferences.getEditorColour,
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
345 )
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
346 self.initColour(
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
347 "MarkerMapBackground",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
348 self.markerMapBackgroundButton,
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
349 Preferences.getEditorColour,
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
350 )
6648
c09e6c6006eb EditorMarkerMap: added cpability to suppress some markers in the marker map.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6645
diff changeset
351 self.changesMarkerCheckBox.setChecked(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
352 Preferences.getEditor("ShowMarkerChanges")
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
353 )
6648
c09e6c6006eb EditorMarkerMap: added cpability to suppress some markers in the marker map.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6645
diff changeset
354 self.coverageMarkerCheckBox.setChecked(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
355 Preferences.getEditor("ShowMarkerCoverage")
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
356 )
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
357 self.searchMarkerCheckBox.setChecked(Preferences.getEditor("ShowMarkerSearch"))
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
358
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
359 self.indentguidesCheckBox.setChecked(Preferences.getEditor("IndentationGuides"))
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
360 self.initColour(
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
361 "IndentationGuidesBackground",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
362 self.indentationGuidesBackgroundButton,
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
363 Preferences.getEditorColour,
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
364 )
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
365 self.initColour(
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
366 "IndentationGuidesForeground",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
367 self.indentationGuidesForegroundButton,
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
368 Preferences.getEditorColour,
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
369 )
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
370
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
371 self.initColour(
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
372 "HighlightMarker",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
373 self.highlightingBackgroundButton,
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
374 Preferences.getEditorColour,
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
375 hasAlpha=True,
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
376 )
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
377
10135
36839e2c6945 Shell Window
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 10069
diff changeset
378 def setMode(self, displayMode):
36839e2c6945 Shell Window
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 10069
diff changeset
379 """
36839e2c6945 Shell Window
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 10069
diff changeset
380 Public method to perform mode dependent setups.
36839e2c6945 Shell Window
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 10069
diff changeset
381
36839e2c6945 Shell Window
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 10069
diff changeset
382 @param displayMode mode of the configuration dialog
36839e2c6945 Shell Window
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 10069
diff changeset
383 @type ConfigurationMode
36839e2c6945 Shell Window
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 10069
diff changeset
384 """
36839e2c6945 Shell Window
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 10069
diff changeset
385 from ..ConfigurationDialog import ConfigurationMode
36839e2c6945 Shell Window
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 10069
diff changeset
386
36839e2c6945 Shell Window
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 10069
diff changeset
387 if displayMode in (ConfigurationMode.SHELLMODE,):
36839e2c6945 Shell Window
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 10069
diff changeset
388 self.foldMarginGroup.hide()
36839e2c6945 Shell Window
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 10069
diff changeset
389 self.caretLineGroup.hide()
36839e2c6945 Shell Window
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 10069
diff changeset
390 self.debuggingGroup.hide()
36839e2c6945 Shell Window
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 10069
diff changeset
391 self.wrapLongLinesGroup.hide()
36839e2c6945 Shell Window
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 10069
diff changeset
392 self.edgeModeGroup.hide()
36839e2c6945 Shell Window
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 10069
diff changeset
393 self.zoomGroup.hide()
36839e2c6945 Shell Window
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 10069
diff changeset
394 self.annotationsGroup.hide()
36839e2c6945 Shell Window
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 10069
diff changeset
395 self.changeTracingGroup.hide()
36839e2c6945 Shell Window
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 10069
diff changeset
396 self.indentationsGroup.hide()
36839e2c6945 Shell Window
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 10069
diff changeset
397 self.markerMapGroup.hide()
36839e2c6945 Shell Window
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 10069
diff changeset
398 self.variousGroup.hide()
36839e2c6945 Shell Window
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 10069
diff changeset
399 self.fontsGroup.hide()
36839e2c6945 Shell Window
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 10069
diff changeset
400 self.lineNumbersGroup.hide()
36839e2c6945 Shell Window
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 10069
diff changeset
401
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
402 def save(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
403 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
404 Public slot to save the Editor Styles configuration.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
405 """
2905
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
406 Preferences.setEditor(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
407 "FoldingStyle", self.foldStyles[self.foldingStyleComboBox.currentIndex()]
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
408 )
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
409 Preferences.setEditorOtherFonts("MarginsFont", self.marginsFont)
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
410 Preferences.setEditorOtherFonts("DefaultFont", self.defaultFont)
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
411 Preferences.setEditorOtherFonts("MonospacedFont", self.monospacedFont)
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
412 Preferences.setEditor("UseMonospacedFont", self.monospacedCheckBox.isChecked())
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
413
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
414 Preferences.setEditor("LinenoMargin", self.linenoCheckBox.isChecked())
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
415 Preferences.setEditor("FoldingMargin", self.foldingCheckBox.isChecked())
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
416
2905
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
417 Preferences.setEditor(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
418 "CaretLineVisible", self.caretlineVisibleCheckBox.isChecked()
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
419 )
2905
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
420 Preferences.setEditor(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
421 "CaretLineAlwaysVisible", self.caretlineAlwaysVisibleCheckBox.isChecked()
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
422 )
2905
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
423 Preferences.setEditor(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
424 "ColourizeSelText", self.colourizeSelTextCheckBox.isChecked()
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
425 )
2905
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
426 Preferences.setEditor(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
427 "CustomSelectionColours", self.customSelColourCheckBox.isChecked()
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
428 )
2905
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
429 Preferences.setEditor(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
430 "ExtendSelectionToEol", self.extentSelEolCheckBox.isChecked()
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
431 )
5733
aed3e558407f Reintroduced the highlighting of current instruction line and the error line using colored background. It is configurable whether to use these backgrounds or the arrows.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5706
diff changeset
432 Preferences.setEditor(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
433 "LineMarkersBackground", self.debugMarkerBackgroundCheckBox.isChecked()
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
434 )
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
435
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
436 Preferences.setEditor("CaretWidth", self.caretWidthSpinBox.value())
2905
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
437 Preferences.setEditor(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
438 "CaretLineFrameWidth", self.caretlineFrameWidthSpinBox.value()
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
439 )
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
440
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
441 Preferences.setEditor("ShowEOL", self.eolCheckBox.isChecked())
2905
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
442 Preferences.setEditor(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
443 "WrapLongLinesMode",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
444 self.wrapModeComboBox.itemData(self.wrapModeComboBox.currentIndex()),
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
445 )
2905
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
446 Preferences.setEditor(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
447 "WrapVisualFlag",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
448 self.wrapVisualComboBox.itemData(self.wrapVisualComboBox.currentIndex()),
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
449 )
2905
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
450 Preferences.setEditor(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
451 "WrapIndentMode",
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
452 self.wrapIndentComboBox.itemData(self.wrapIndentComboBox.currentIndex()),
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
453 )
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
454 Preferences.setEditor("WrapStartIndent", self.wrapStartIndentSpinBox.value())
6843
5e1afd1577b9 Editor: added these capabilities
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6842
diff changeset
455 Preferences.setEditor(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
456 "EdgeMode", self.edgeModes[self.edgeModeCombo.currentIndex()]
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
457 )
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
458 Preferences.setEditor("EdgeColumn", self.edgeLineColumnSlider.value())
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
459
2905
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
460 Preferences.setEditor(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
461 "BraceHighlighting", self.bracehighlightingCheckBox.isChecked()
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
462 )
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
463
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
464 Preferences.setEditor("ZoomFactor", self.zoomfactorSlider.value())
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
465
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
466 Preferences.setEditor("ShowWhitespace", self.whitespaceCheckBox.isChecked())
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
467 Preferences.setEditor("WhitespaceSize", self.whitespaceSizeSpinBox.value())
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
468
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
469 Preferences.setEditor("MiniContextMenu", self.miniMenuCheckBox.isChecked())
2905
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
470 Preferences.setEditor(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
471 "HideFormatButtons", self.hideFormatButtonsCheckBox.isChecked()
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
472 )
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
473
5416
16366120b523 Added an option to hide the format buttons bar, if formatting is not supported for the editor text type (only supported for HTML, Markdown and reStructured Text).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 5389
diff changeset
474 Preferences.setEditor(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
475 "AnnotationsEnabled", self.enableAnnotationsCheckBox.isChecked()
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
476 )
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
477
2905
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
478 Preferences.setEditor(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
479 "OverrideEditAreaColours", self.editAreaOverrideCheckBox.isChecked()
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
480 )
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
481
2905
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
482 Preferences.setEditor(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
483 "OnlineChangeTrace", self.enableChangeTraceCheckBox.isChecked()
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
484 )
2905
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
485 Preferences.setEditor(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
486 "OnlineChangeTraceInterval", self.changeTraceTimeoutSpinBox.value()
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
487 )
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
488
4176
4c09d3d75768 Added capability to configure the indentation guides colors.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4164
diff changeset
489 Preferences.setEditor(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
490 "IndentationGuides", self.indentguidesCheckBox.isChecked()
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
491 )
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
492
6278
13fd8759f981 Editor, E5MapWidget: added a configuration option (Editor->Style page) to show the marker map on the left or right of the editor
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6111
diff changeset
493 Preferences.setEditor(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
494 "ShowMarkerMapOnRight", self.markerMapRightCheckBox.isChecked()
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
495 )
6648
c09e6c6006eb EditorMarkerMap: added cpability to suppress some markers in the marker map.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6645
diff changeset
496 Preferences.setEditor(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
497 "ShowMarkerChanges", self.changesMarkerCheckBox.isChecked()
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
498 )
6648
c09e6c6006eb EditorMarkerMap: added cpability to suppress some markers in the marker map.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6645
diff changeset
499 Preferences.setEditor(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
500 "ShowMarkerCoverage", self.coverageMarkerCheckBox.isChecked()
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
501 )
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
502 Preferences.setEditor("ShowMarkerSearch", self.searchMarkerCheckBox.isChecked())
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
503
2230
2b1b9265156c Optimized the colour selection code of configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2164
diff changeset
504 self.saveColours(Preferences.setEditorColour)
10279
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 10135
diff changeset
505 for color in self.editorColours:
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 10135
diff changeset
506 Preferences.setEditorColour(color, self.editorColours[color])
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
507
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
508 @pyqtSlot()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
509 def on_linenumbersFontButton_clicked(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
510 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
511 Private method used to select the font for the editor margins.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
512 """
2905
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
513 self.marginsFont = self.selectFont(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
514 self.marginsFontSample,
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
515 self.marginsFont,
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
516 options=QFontDialog.FontDialogOption.MonospacedFonts,
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
517 )
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
518
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
519 @pyqtSlot()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
520 def on_defaultFontButton_clicked(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
521 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
522 Private method used to select the default font for the editor.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
523 """
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
524 self.defaultFont = self.selectFont(self.defaultFontSample, self.defaultFont)
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
525
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
526 @pyqtSlot()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
527 def on_monospacedFontButton_clicked(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
528 """
2905
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
529 Private method used to select the font to be used as the monospaced
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
530 font.
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
531 """
2905
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
532 self.monospacedFont = self.selectFont(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
533 self.monospacedFontSample,
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
534 self.monospacedFont,
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
535 options=QFontDialog.FontDialogOption.MonospacedFonts,
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
536 )
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
537
8854
68c67538da4e Changed some more widgets to work with style sheets instead of manipulating the palette.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8322
diff changeset
538 def __setSampleStyleSheet(self, sampleLineEdit, color, background):
68c67538da4e Changed some more widgets to work with style sheets instead of manipulating the palette.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8322
diff changeset
539 """
68c67538da4e Changed some more widgets to work with style sheets instead of manipulating the palette.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8322
diff changeset
540 Private method to colorize a sample with given foreground and
68c67538da4e Changed some more widgets to work with style sheets instead of manipulating the palette.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8322
diff changeset
541 background colors.
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
542
8854
68c67538da4e Changed some more widgets to work with style sheets instead of manipulating the palette.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8322
diff changeset
543 @param sampleLineEdit line edit element to be colorized
68c67538da4e Changed some more widgets to work with style sheets instead of manipulating the palette.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8322
diff changeset
544 @type QLineEdit
68c67538da4e Changed some more widgets to work with style sheets instead of manipulating the palette.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8322
diff changeset
545 @param color text color to be shown
68c67538da4e Changed some more widgets to work with style sheets instead of manipulating the palette.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8322
diff changeset
546 @type QColor
68c67538da4e Changed some more widgets to work with style sheets instead of manipulating the palette.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8322
diff changeset
547 @param background background color to be shown
68c67538da4e Changed some more widgets to work with style sheets instead of manipulating the palette.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8322
diff changeset
548 @type QColor
68c67538da4e Changed some more widgets to work with style sheets instead of manipulating the palette.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8322
diff changeset
549 """
68c67538da4e Changed some more widgets to work with style sheets instead of manipulating the palette.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8322
diff changeset
550 sampleLineEdit.setStyleSheet(
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
551 "QLineEdit {{ color: {0}; background-color: {1}; }}".format(
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
552 color.name(), background.name()
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
553 )
8854
68c67538da4e Changed some more widgets to work with style sheets instead of manipulating the palette.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8322
diff changeset
554 )
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
555
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
556 def polishPage(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
557 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
558 Public slot to perform some polishing actions.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
559 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
560 self.marginsFontSample.setFont(self.marginsFont)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
561 self.defaultFontSample.setFont(self.defaultFont)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
562 self.monospacedFontSample.setFont(self.monospacedFont)
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
563
8854
68c67538da4e Changed some more widgets to work with style sheets instead of manipulating the palette.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8322
diff changeset
564 self.__setSampleStyleSheet(
68c67538da4e Changed some more widgets to work with style sheets instead of manipulating the palette.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8322
diff changeset
565 self.annotationsWarningSample,
68c67538da4e Changed some more widgets to work with style sheets instead of manipulating the palette.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8322
diff changeset
566 self.editorColours["AnnotationsWarningForeground"],
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
567 self.editorColours["AnnotationsWarningBackground"],
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
568 )
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
569
8854
68c67538da4e Changed some more widgets to work with style sheets instead of manipulating the palette.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8322
diff changeset
570 self.__setSampleStyleSheet(
68c67538da4e Changed some more widgets to work with style sheets instead of manipulating the palette.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8322
diff changeset
571 self.annotationsErrorSample,
68c67538da4e Changed some more widgets to work with style sheets instead of manipulating the palette.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8322
diff changeset
572 self.editorColours["AnnotationsErrorForeground"],
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
573 self.editorColours["AnnotationsErrorBackground"],
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
574 )
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
575
8854
68c67538da4e Changed some more widgets to work with style sheets instead of manipulating the palette.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8322
diff changeset
576 self.__setSampleStyleSheet(
68c67538da4e Changed some more widgets to work with style sheets instead of manipulating the palette.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8322
diff changeset
577 self.annotationsStyleWarningSample,
68c67538da4e Changed some more widgets to work with style sheets instead of manipulating the palette.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 8322
diff changeset
578 self.editorColours["AnnotationsStyleForeground"],
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
579 self.editorColours["AnnotationsStyleBackground"],
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
580 )
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
581
10279
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 10135
diff changeset
582 self.__setSampleStyleSheet(
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 10135
diff changeset
583 self.annotationsInformationSample,
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 10135
diff changeset
584 self.editorColours["AnnotationsInfoForeground"],
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 10135
diff changeset
585 self.editorColours["AnnotationsInfoBackground"],
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 10135
diff changeset
586 )
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 10135
diff changeset
587
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 10135
diff changeset
588 def __selectAnnotationColor(self, annotationType, isBackground, annotationSample):
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 10135
diff changeset
589 """
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 10135
diff changeset
590 Private method to select an annotation color and update the sample.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 10135
diff changeset
591
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 10135
diff changeset
592 @param annotationType type of the annotation
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 10135
diff changeset
593 @type str
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 10135
diff changeset
594 @param isBackground flag indicating the background color
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 10135
diff changeset
595 @type bool
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 10135
diff changeset
596 @param annotationSample reference to the annotation sample widget
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 10135
diff changeset
597 @type QLineEdit
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 10135
diff changeset
598 """
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 10135
diff changeset
599 bgColorStr = f"Annotations{annotationType}Background"
10282
092821fb6f18 Corrected some code style issues.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 10279
diff changeset
600 fgColorStr = f"Annotations{annotationType}Foreground"
10279
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 10135
diff changeset
601
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 10135
diff changeset
602 color = QColorDialog.getColor(
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 10135
diff changeset
603 self.editorColours[bgColorStr]
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 10135
diff changeset
604 if isBackground
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 10135
diff changeset
605 else self.editorColours[fgColorStr]
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 10135
diff changeset
606 )
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 10135
diff changeset
607 if color.isValid():
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 10135
diff changeset
608 self.__setSampleStyleSheet(
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 10135
diff changeset
609 annotationSample,
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 10135
diff changeset
610 self.editorColours[fgColorStr] if isBackground else color,
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 10135
diff changeset
611 color if isBackground else self.editorColours[bgColorStr],
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 10135
diff changeset
612 )
10303
ee1aadab1215 Changed code to use the 'argparse' module to parse the command line parameters instead of using own code.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 10282
diff changeset
613 self.editorColours[bgColorStr if isBackground else fgColorStr] = color
10279
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 10135
diff changeset
614
729
090203934c19 Finished implementing the annotations support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
615 @pyqtSlot()
090203934c19 Finished implementing the annotations support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
616 def on_annotationsWarningFgButton_clicked(self):
090203934c19 Finished implementing the annotations support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
617 """
090203934c19 Finished implementing the annotations support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
618 Private slot to set the foreground colour of the warning annotations.
090203934c19 Finished implementing the annotations support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
619 """
10279
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 10135
diff changeset
620 self.__selectAnnotationColor("Warning", False, self.annotationsWarningSample)
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
621
729
090203934c19 Finished implementing the annotations support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
622 @pyqtSlot()
090203934c19 Finished implementing the annotations support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
623 def on_annotationsWarningBgButton_clicked(self):
090203934c19 Finished implementing the annotations support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
624 """
090203934c19 Finished implementing the annotations support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
625 Private slot to set the background colour of the warning annotations.
090203934c19 Finished implementing the annotations support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
626 """
10279
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 10135
diff changeset
627 self.__selectAnnotationColor("Warning", True, self.annotationsWarningSample)
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
628
729
090203934c19 Finished implementing the annotations support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
629 @pyqtSlot()
090203934c19 Finished implementing the annotations support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
630 def on_annotationsErrorFgButton_clicked(self):
090203934c19 Finished implementing the annotations support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
631 """
090203934c19 Finished implementing the annotations support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
632 Private slot to set the foreground colour of the error annotations.
090203934c19 Finished implementing the annotations support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
633 """
10279
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 10135
diff changeset
634 self.__selectAnnotationColor("Error", False, self.annotationsErrorSample)
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
635
729
090203934c19 Finished implementing the annotations support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
636 @pyqtSlot()
090203934c19 Finished implementing the annotations support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
637 def on_annotationsErrorBgButton_clicked(self):
090203934c19 Finished implementing the annotations support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
638 """
090203934c19 Finished implementing the annotations support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
639 Private slot to set the background colour of the error annotations.
090203934c19 Finished implementing the annotations support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
640 """
10279
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 10135
diff changeset
641 self.__selectAnnotationColor("Error", True, self.annotationsErrorSample)
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
642
2905
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
643 @pyqtSlot()
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
644 def on_annotationsStyleWarningFgButton_clicked(self):
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
645 """
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
646 Private slot to set the foreground colour of the style annotations.
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
647 """
10279
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 10135
diff changeset
648 self.__selectAnnotationColor("Style", False, self.annotationsStyleWarningSample)
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
649
2905
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
650 @pyqtSlot()
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
651 def on_annotationsStyleWarningBgButton_clicked(self):
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
652 """
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
653 Private slot to set the background colour of the style annotations.
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
654 """
10279
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 10135
diff changeset
655 self.__selectAnnotationColor("Style", True, self.annotationsStyleWarningSample)
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 10135
diff changeset
656
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 10135
diff changeset
657 @pyqtSlot()
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 10135
diff changeset
658 def on_annotationsInformationFgButton_clicked(self):
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 10135
diff changeset
659 """
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 10135
diff changeset
660 Private slot to set the foreground colour of the information annotations.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 10135
diff changeset
661 """
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 10135
diff changeset
662 self.__selectAnnotationColor("Info", False, self.annotationsInformationSample)
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 10135
diff changeset
663
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 10135
diff changeset
664 @pyqtSlot()
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 10135
diff changeset
665 def on_annotationsInformationBgButton_clicked(self):
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 10135
diff changeset
666 """
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 10135
diff changeset
667 Private slot to set the background colour of the information annotations.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 10135
diff changeset
668 """
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 10135
diff changeset
669 self.__selectAnnotationColor("Info", True, self.annotationsInformationSample)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
670
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
671
10069
435cc5875135 Corrected and checked some code style issues (unused function arguments).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9653
diff changeset
672 def create(dlg): # noqa: U100
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
673 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
674 Module function to create the configuration page.
9221
bf71ee032bb4 Reformatted the source code using the 'Black' utility.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 9209
diff changeset
675
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
676 @param dlg reference to the configuration dialog
10428
a071d4065202 Converted some source code documentation to the new style.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 10303
diff changeset
677 @type ConfigurationDialog
a071d4065202 Converted some source code documentation to the new style.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 10303
diff changeset
678 @return reference to the instantiated page
a071d4065202 Converted some source code documentation to the new style.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 10303
diff changeset
679 @rtype ConfigurationPageBase
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
680 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
681 page = EditorStylesPage()
729
090203934c19 Finished implementing the annotations support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
682 return page

eric ide

mercurial