eric6/Preferences/ConfigurationPages/EditorStylesPage.py

Wed, 30 Dec 2020 11:00:44 +0100

author
Detlev Offenbach <detlev@die-offenbachs.de>
date
Wed, 30 Dec 2020 11:00:44 +0100
branch
maintenance
changeset 7924
8a96736d465e
parent 7780
41420f82c0ac
child 8143
2c730d5fd177
permissions
-rw-r--r--

Updated copyright for 2021.

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
7924
8a96736d465e Updated copyright for 2021.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7780
diff changeset
3 # Copyright (c) 2006 - 2021 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
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3484
diff changeset
10 from PyQt5.QtCore import pyqtSlot
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3484
diff changeset
11 from PyQt5.QtGui import QColor, QPalette
4674
41f716db325e Some enhancements of the configuration pages for the selection of fonts.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
12 from PyQt5.QtWidgets import QColorDialog, QFontDialog
3656
441956d8fce5 Started porting eric5 to PyQt5.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3484
diff changeset
13 from PyQt5.Qsci import QsciScintilla
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
14
12
1d8dd9706f46 First commit after changing to Python 3.1.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7
diff changeset
15 from .ConfigurationPageBase import ConfigurationPageBase
1d8dd9706f46 First commit after changing to Python 3.1.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7
diff changeset
16 from .Ui_EditorStylesPage import Ui_EditorStylesPage
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
17
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
18 import Preferences
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
19
4676
c65b401b775e Implemented a fix for the last change to work with Qt4/PyQt4.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4674
diff changeset
20 try:
c65b401b775e Implemented a fix for the last change to work with Qt4/PyQt4.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4674
diff changeset
21 MonospacedFontsOption = QFontDialog.MonospacedFonts
c65b401b775e Implemented a fix for the last change to work with Qt4/PyQt4.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4674
diff changeset
22 except AttributeError:
c65b401b775e Implemented a fix for the last change to work with Qt4/PyQt4.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4674
diff changeset
23 MonospacedFontsOption = QFontDialog.FontDialogOptions(0x10)
c65b401b775e Implemented a fix for the last change to work with Qt4/PyQt4.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4674
diff changeset
24
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
25
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
26 class EditorStylesPage(ConfigurationPageBase, Ui_EditorStylesPage):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
27 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
28 Class implementing the Editor Styles configuration page.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
29 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
30 def __init__(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
31 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
32 Constructor
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
33 """
2525
8b507a9a2d40 Script changes: Future import added, super calls modified and unicode behavior for str.
T.Rzepka <Tobias.Rzepka@gmail.com>
parents: 2408
diff changeset
34 super(EditorStylesPage, self).__init__()
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
35 self.setupUi(self)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
36 self.setObjectName("EditorStylesPage")
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
37
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
38 from QScintilla.QsciScintillaCompat import QsciScintillaCompat
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
39
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
40 self.foldStyles = [
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
41 QsciScintilla.PlainFoldStyle,
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
42 QsciScintilla.CircledFoldStyle,
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
43 QsciScintilla.BoxedFoldStyle,
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
44 QsciScintilla.CircledTreeFoldStyle,
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
45 QsciScintilla.BoxedTreeFoldStyle,
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
46 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
47 QsciScintillaCompat.ArrowTreeFoldStyle,
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
48 ]
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
49
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
50 self.edgeModes = [
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
51 QsciScintilla.EdgeNone,
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
52 QsciScintilla.EdgeLine,
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
53 QsciScintilla.EdgeBackground
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
54 ]
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
55
2905
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
56 self.wrapModeComboBox.addItem(
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
57 self.tr("Disabled"), QsciScintilla.WrapNone)
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(
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
59 self.tr("Word Boundary"), QsciScintilla.WrapWord)
2905
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
60 self.wrapModeComboBox.addItem(
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
61 self.tr("Character Boundary"), QsciScintilla.WrapCharacter)
2905
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
62 self.wrapVisualComboBox.addItem(
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
63 self.tr("No Indicator"), QsciScintilla.WrapFlagNone)
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(
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
65 self.tr("Indicator by Text"), QsciScintilla.WrapFlagByText)
2905
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
66 self.wrapVisualComboBox.addItem(
3190
a9a94491c4fd Changed the code to use QObject.tr() instead of QObject.trUtf8().
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3160
diff changeset
67 self.tr("Indicator by Margin"), QsciScintilla.WrapFlagByBorder)
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
68 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
69 self.tr("Indicator in Line Number Margin"),
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
70 QsciScintilla.WrapFlagInMargin)
2261
f4bb5648fc29 Made some adjustments for QScintilla 2.7.0.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2230
diff changeset
71
6842
c83dcb7c6147 Editor, MiniEditor: added capability to configure the subline indentation for wrapped lines.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6648
diff changeset
72 self.wrapIndentComboBox.addItem(
6843
5e1afd1577b9 Editor: added these capabilities
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6842
diff changeset
73 self.tr("Fixed"), QsciScintilla.WrapIndentFixed)
6842
c83dcb7c6147 Editor, MiniEditor: added capability to configure the subline indentation for wrapped lines.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6648
diff changeset
74 self.wrapIndentComboBox.addItem(
6843
5e1afd1577b9 Editor: added these capabilities
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6842
diff changeset
75 self.tr("Aligned"), QsciScintilla.WrapIndentSame)
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(
6843
5e1afd1577b9 Editor: added these capabilities
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6842
diff changeset
77 self.tr("Aligned plus One"),
6842
c83dcb7c6147 Editor, MiniEditor: added capability to configure the subline indentation for wrapped lines.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6648
diff changeset
78 QsciScintilla.WrapIndentIndented)
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
79 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
80 self.tr("Aligned plus Two"),
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
81 QsciScintilla.WrapIndentDeeplyIndented)
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
82
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
83 # set initial values
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
84 try:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
85 self.foldingStyleComboBox.setCurrentIndex(
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
86 self.foldStyles.index(Preferences.getEditor("FoldingStyle")))
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
87 except ValueError:
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
88 self.foldingStyleComboBox.setCurrentIndex(0)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
89 self.marginsFont = Preferences.getEditorOtherFonts("MarginsFont")
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
90 self.marginsFontSample.setFont(self.marginsFont)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
91 self.defaultFont = Preferences.getEditorOtherFonts("DefaultFont")
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
92 self.defaultFontSample.setFont(self.defaultFont)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
93 self.monospacedFont = Preferences.getEditorOtherFonts("MonospacedFont")
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
94 self.monospacedFontSample.setFont(self.monospacedFont)
564
b3d966393ba9 Did some code cleanup.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 342
diff changeset
95 self.monospacedCheckBox.setChecked(
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
96 Preferences.getEditor("UseMonospacedFont"))
564
b3d966393ba9 Did some code cleanup.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 342
diff changeset
97 self.linenoCheckBox.setChecked(
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
98 Preferences.getEditor("LinenoMargin"))
564
b3d966393ba9 Did some code cleanup.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 342
diff changeset
99 self.foldingCheckBox.setChecked(
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
100 Preferences.getEditor("FoldingMargin"))
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
101
564
b3d966393ba9 Did some code cleanup.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 342
diff changeset
102 self.caretlineVisibleCheckBox.setChecked(
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
103 Preferences.getEditor("CaretLineVisible"))
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
104 self.caretlineAlwaysVisibleCheckBox.setChecked(
8fd7ae10de2b Implemented support for the new QScintilla feature to always highlight the caret line.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2964
diff changeset
105 Preferences.getEditor("CaretLineAlwaysVisible"))
564
b3d966393ba9 Did some code cleanup.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 342
diff changeset
106 self.caretWidthSpinBox.setValue(
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
107 Preferences.getEditor("CaretWidth"))
6843
5e1afd1577b9 Editor: added these capabilities
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6842
diff changeset
108 self.caretlineFrameWidthSpinBox.setValue(
5e1afd1577b9 Editor: added these capabilities
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6842
diff changeset
109 Preferences.getEditor("CaretLineFrameWidth"))
564
b3d966393ba9 Did some code cleanup.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 342
diff changeset
110 self.colourizeSelTextCheckBox.setChecked(
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
111 Preferences.getEditor("ColourizeSelText"))
564
b3d966393ba9 Did some code cleanup.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 342
diff changeset
112 self.customSelColourCheckBox.setChecked(
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
113 Preferences.getEditor("CustomSelectionColours"))
564
b3d966393ba9 Did some code cleanup.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 342
diff changeset
114 self.extentSelEolCheckBox.setChecked(
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
115 Preferences.getEditor("ExtendSelectionToEol"))
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
116 self.debugMarkerBackgroundCheckBox.setChecked(
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
117 Preferences.getEditor("LineMarkersBackground"))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
118
2230
2b1b9265156c Optimized the colour selection code of configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2164
diff changeset
119 self.initColour("CaretForeground", self.caretForegroundButton,
2905
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
120 Preferences.getEditorColour)
2230
2b1b9265156c Optimized the colour selection code of configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2164
diff changeset
121 self.initColour("CaretLineBackground", self.caretlineBackgroundButton,
2905
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
122 Preferences.getEditorColour, hasAlpha=True)
2230
2b1b9265156c Optimized the colour selection code of configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2164
diff changeset
123 self.initColour("SelectionForeground", self.selectionForegroundButton,
2905
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
124 Preferences.getEditorColour)
2230
2b1b9265156c Optimized the colour selection code of configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2164
diff changeset
125 self.initColour("SelectionBackground", self.selectionBackgroundButton,
2905
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
126 Preferences.getEditorColour, hasAlpha=True)
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
127 self.initColour("CurrentMarker", self.currentLineMarkerButton,
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
128 Preferences.getEditorColour, hasAlpha=True)
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
129 self.initColour("ErrorMarker", self.errorMarkerButton,
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
130 Preferences.getEditorColour, hasAlpha=True)
2230
2b1b9265156c Optimized the colour selection code of configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2164
diff changeset
131 self.initColour("MarginsForeground", self.marginsForegroundButton,
2905
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
132 Preferences.getEditorColour)
2230
2b1b9265156c Optimized the colour selection code of configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2164
diff changeset
133 self.initColour("MarginsBackground", self.marginsBackgroundButton,
2905
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
134 Preferences.getEditorColour)
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
135 self.initColour("FoldmarginBackground",
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
136 self.foldmarginBackgroundButton,
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
137 Preferences.getEditorColour)
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
138 self.initColour("FoldMarkersForeground",
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
139 self.foldmarkersForegroundButton,
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
140 Preferences.getEditorColour)
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
141 self.initColour("FoldMarkersBackground",
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
142 self.foldmarkersBackgroundButton,
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
143 Preferences.getEditorColour)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
144
2230
2b1b9265156c Optimized the colour selection code of configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2164
diff changeset
145 self.editorColours = {}
7263
c1af2e327675 Continued to resolve code style issue M841.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7229
diff changeset
146 self.editorColours["AnnotationsWarningForeground"] = QColor(
c1af2e327675 Continued to resolve code style issue M841.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7229
diff changeset
147 Preferences.getEditorColour("AnnotationsWarningForeground"))
c1af2e327675 Continued to resolve code style issue M841.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7229
diff changeset
148 self.editorColours["AnnotationsWarningBackground"] = QColor(
c1af2e327675 Continued to resolve code style issue M841.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7229
diff changeset
149 Preferences.getEditorColour("AnnotationsWarningBackground"))
c1af2e327675 Continued to resolve code style issue M841.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7229
diff changeset
150 self.editorColours["AnnotationsErrorForeground"] = QColor(
c1af2e327675 Continued to resolve code style issue M841.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7229
diff changeset
151 Preferences.getEditorColour("AnnotationsErrorForeground"))
c1af2e327675 Continued to resolve code style issue M841.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7229
diff changeset
152 self.editorColours["AnnotationsErrorBackground"] = QColor(
c1af2e327675 Continued to resolve code style issue M841.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7229
diff changeset
153 Preferences.getEditorColour("AnnotationsErrorBackground"))
c1af2e327675 Continued to resolve code style issue M841.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7229
diff changeset
154 self.editorColours["AnnotationsStyleForeground"] = QColor(
c1af2e327675 Continued to resolve code style issue M841.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7229
diff changeset
155 Preferences.getEditorColour("AnnotationsStyleForeground"))
c1af2e327675 Continued to resolve code style issue M841.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7229
diff changeset
156 self.editorColours["AnnotationsStyleBackground"] = QColor(
c1af2e327675 Continued to resolve code style issue M841.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7229
diff changeset
157 Preferences.getEditorColour("AnnotationsStyleBackground"))
729
090203934c19 Finished implementing the annotations support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
158
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
159 self.eolCheckBox.setChecked(Preferences.getEditor("ShowEOL"))
2261
f4bb5648fc29 Made some adjustments for QScintilla 2.7.0.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2230
diff changeset
160 self.wrapModeComboBox.setCurrentIndex(self.wrapModeComboBox.findData(
f4bb5648fc29 Made some adjustments for QScintilla 2.7.0.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2230
diff changeset
161 Preferences.getEditor("WrapLongLinesMode")))
2905
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
162 self.wrapVisualComboBox.setCurrentIndex(
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
163 self.wrapVisualComboBox.findData(
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
164 Preferences.getEditor("WrapVisualFlag")))
6842
c83dcb7c6147 Editor, MiniEditor: added capability to configure the subline indentation for wrapped lines.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6648
diff changeset
165 self.wrapIndentComboBox.setCurrentIndex(
c83dcb7c6147 Editor, MiniEditor: added capability to configure the subline indentation for wrapped lines.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6648
diff changeset
166 self.wrapIndentComboBox.findData(
c83dcb7c6147 Editor, MiniEditor: added capability to configure the subline indentation for wrapped lines.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6648
diff changeset
167 Preferences.getEditor("WrapIndentMode")))
6843
5e1afd1577b9 Editor: added these capabilities
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6842
diff changeset
168 self.wrapStartIndentSpinBox.setValue(
5e1afd1577b9 Editor: added these capabilities
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6842
diff changeset
169 Preferences.getEditor("WrapStartIndent"))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
170
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
171 self.edgeModeCombo.setCurrentIndex(
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
172 self.edgeModes.index(Preferences.getEditor("EdgeMode")))
564
b3d966393ba9 Did some code cleanup.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 342
diff changeset
173 self.edgeLineColumnSlider.setValue(
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
174 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
175 self.initColour(
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
176 "Edge", self.edgeBackgroundColorButton,
2230
2b1b9265156c Optimized the colour selection code of configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2164
diff changeset
177 Preferences.getEditorColour)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
178
564
b3d966393ba9 Did some code cleanup.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 342
diff changeset
179 self.bracehighlightingCheckBox.setChecked(
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
180 Preferences.getEditor("BraceHighlighting"))
2230
2b1b9265156c Optimized the colour selection code of configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2164
diff changeset
181 self.initColour("MatchingBrace", self.matchingBracesButton,
2905
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
182 Preferences.getEditorColour)
2230
2b1b9265156c Optimized the colour selection code of configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2164
diff changeset
183 self.initColour("MatchingBraceBack", self.matchingBracesBackButton,
2905
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
184 Preferences.getEditorColour)
2230
2b1b9265156c Optimized the colour selection code of configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2164
diff changeset
185 self.initColour("NonmatchingBrace", self.nonmatchingBracesButton,
2905
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
186 Preferences.getEditorColour)
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
187 self.initColour("NonmatchingBraceBack",
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
188 self.nonmatchingBracesBackButton,
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
189 Preferences.getEditorColour)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
190
230
2cde09c26384 Added code to configure the zoom factor a file is opened with.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 97
diff changeset
191 self.zoomfactorSlider.setValue(
2cde09c26384 Added code to configure the zoom factor a file is opened with.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 97
diff changeset
192 Preferences.getEditor("ZoomFactor"))
2cde09c26384 Added code to configure the zoom factor a file is opened with.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 97
diff changeset
193
564
b3d966393ba9 Did some code cleanup.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 342
diff changeset
194 self.whitespaceCheckBox.setChecked(
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
195 Preferences.getEditor("ShowWhitespace"))
939
10d3a201cd27 Added configuration options for visible whitespace (as of QScintilla 2.5).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 791
diff changeset
196 self.whitespaceSizeSpinBox.setValue(
10d3a201cd27 Added configuration options for visible whitespace (as of QScintilla 2.5).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 791
diff changeset
197 Preferences.getEditor("WhitespaceSize"))
2905
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
198 self.initColour("WhitespaceForeground",
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
199 self.whitespaceForegroundButton,
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
200 Preferences.getEditorColour)
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
201 self.initColour("WhitespaceBackground",
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
202 self.whitespaceBackgroundButton,
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
203 Preferences.getEditorColour)
939
10d3a201cd27 Added configuration options for visible whitespace (as of QScintilla 2.5).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 791
diff changeset
204 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
205 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
206 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
207 self.whitespaceBackgroundButton.setEnabled(False)
10d3a201cd27 Added configuration options for visible whitespace (as of QScintilla 2.5).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 791
diff changeset
208
564
b3d966393ba9 Did some code cleanup.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 342
diff changeset
209 self.miniMenuCheckBox.setChecked(
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
210 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
211 self.hideFormatButtonsCheckBox.setChecked(
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
212 Preferences.getEditor("HideFormatButtons"))
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
213
729
090203934c19 Finished implementing the annotations support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
214 self.enableAnnotationsCheckBox.setChecked(
090203934c19 Finished implementing the annotations support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
215 Preferences.getEditor("AnnotationsEnabled"))
090203934c19 Finished implementing the annotations support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
216
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
217 self.editAreaOverrideCheckBox.setChecked(
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
218 Preferences.getEditor("OverrideEditAreaColours"))
2905
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
219 self.initColour(
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
220 "EditAreaForeground", self.editAreaForegroundButton,
2230
2b1b9265156c Optimized the colour selection code of configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2164
diff changeset
221 Preferences.getEditorColour)
2905
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
222 self.initColour(
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
223 "EditAreaBackground", self.editAreaBackgroundButton,
2230
2b1b9265156c Optimized the colour selection code of configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2164
diff changeset
224 Preferences.getEditorColour)
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
225
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
226 self.enableChangeTraceCheckBox.setChecked(
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
227 Preferences.getEditor("OnlineChangeTrace"))
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
228 self.changeTraceTimeoutSpinBox.setValue(
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
229 Preferences.getEditor("OnlineChangeTraceInterval"))
2230
2b1b9265156c Optimized the colour selection code of configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2164
diff changeset
230 self.initColour("OnlineChangeTraceMarkerUnsaved",
2905
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
231 self.changeMarkerUnsavedColorButton,
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
232 Preferences.getEditorColour)
2230
2b1b9265156c Optimized the colour selection code of configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2164
diff changeset
233 self.initColour("OnlineChangeTraceMarkerSaved",
2905
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
234 self.changeMarkerSavedColorButton,
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
235 Preferences.getEditorColour)
3341
7c015811fc4d Finished implementing support for a marker map in the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3190
diff changeset
236
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
237 self.markerMapRightCheckBox.setChecked(
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
238 Preferences.getEditor("ShowMarkerMapOnRight"))
3341
7c015811fc4d Finished implementing support for a marker map in the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3190
diff changeset
239 self.initColour("BookmarksMap",
7c015811fc4d Finished implementing support for a marker map in the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3190
diff changeset
240 self.bookmarksMapButton,
7c015811fc4d Finished implementing support for a marker map in the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3190
diff changeset
241 Preferences.getEditorColour)
7c015811fc4d Finished implementing support for a marker map in the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3190
diff changeset
242 self.initColour("ErrorsMap",
7c015811fc4d Finished implementing support for a marker map in the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3190
diff changeset
243 self.errorsMapButton,
7c015811fc4d Finished implementing support for a marker map in the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3190
diff changeset
244 Preferences.getEditorColour)
7c015811fc4d Finished implementing support for a marker map in the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3190
diff changeset
245 self.initColour("WarningsMap",
7c015811fc4d Finished implementing support for a marker map in the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3190
diff changeset
246 self.warningsMapButton,
7c015811fc4d Finished implementing support for a marker map in the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3190
diff changeset
247 Preferences.getEditorColour)
7c015811fc4d Finished implementing support for a marker map in the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3190
diff changeset
248 self.initColour("BreakpointsMap",
7c015811fc4d Finished implementing support for a marker map in the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3190
diff changeset
249 self.breakpointsMapButton,
7c015811fc4d Finished implementing support for a marker map in the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3190
diff changeset
250 Preferences.getEditorColour)
7c015811fc4d Finished implementing support for a marker map in the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3190
diff changeset
251 self.initColour("TasksMap",
7c015811fc4d Finished implementing support for a marker map in the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3190
diff changeset
252 self.tasksMapButton,
7c015811fc4d Finished implementing support for a marker map in the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3190
diff changeset
253 Preferences.getEditorColour)
7c015811fc4d Finished implementing support for a marker map in the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3190
diff changeset
254 self.initColour("CoverageMap",
7c015811fc4d Finished implementing support for a marker map in the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3190
diff changeset
255 self.coverageMapButton,
7c015811fc4d Finished implementing support for a marker map in the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3190
diff changeset
256 Preferences.getEditorColour)
7c015811fc4d Finished implementing support for a marker map in the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3190
diff changeset
257 self.initColour("ChangesMap",
7c015811fc4d Finished implementing support for a marker map in the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3190
diff changeset
258 self.changesMapButton,
7c015811fc4d Finished implementing support for a marker map in the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3190
diff changeset
259 Preferences.getEditorColour)
7c015811fc4d Finished implementing support for a marker map in the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3190
diff changeset
260 self.initColour("CurrentMap",
7c015811fc4d Finished implementing support for a marker map in the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3190
diff changeset
261 self.currentMapButton,
7c015811fc4d Finished implementing support for a marker map in the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3190
diff changeset
262 Preferences.getEditorColour)
4304
f85965649066 Added the search markers to the marker map of the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4176
diff changeset
263 self.initColour("SearchMarkersMap",
f85965649066 Added the search markers to the marker map of the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4176
diff changeset
264 self.searchMarkerMapButton,
f85965649066 Added the search markers to the marker map of the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4176
diff changeset
265 Preferences.getEditorColour)
6111
d38b38117d83 Added VCS conflict markers to the types shown on the marker map.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6048
diff changeset
266 self.initColour("VcsConflictMarkersMap",
d38b38117d83 Added VCS conflict markers to the types shown on the marker map.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6048
diff changeset
267 self.conflictMarkerMapButton,
d38b38117d83 Added VCS conflict markers to the types shown on the marker map.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6048
diff changeset
268 Preferences.getEditorColour)
3341
7c015811fc4d Finished implementing support for a marker map in the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3190
diff changeset
269 self.initColour("MarkerMapBackground",
7c015811fc4d Finished implementing support for a marker map in the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3190
diff changeset
270 self.markerMapBackgroundButton,
7c015811fc4d Finished implementing support for a marker map in the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 3190
diff changeset
271 Preferences.getEditorColour)
6648
c09e6c6006eb EditorMarkerMap: added cpability to suppress some markers in the marker map.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6645
diff changeset
272 self.changesMarkerCheckBox.setChecked(
c09e6c6006eb EditorMarkerMap: added cpability to suppress some markers in the marker map.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6645
diff changeset
273 Preferences.getEditor("ShowMarkerChanges"))
c09e6c6006eb EditorMarkerMap: added cpability to suppress some markers in the marker map.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6645
diff changeset
274 self.coverageMarkerCheckBox.setChecked(
c09e6c6006eb EditorMarkerMap: added cpability to suppress some markers in the marker map.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6645
diff changeset
275 Preferences.getEditor("ShowMarkerCoverage"))
c09e6c6006eb EditorMarkerMap: added cpability to suppress some markers in the marker map.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6645
diff changeset
276 self.searchMarkerCheckBox.setChecked(
c09e6c6006eb EditorMarkerMap: added cpability to suppress some markers in the marker map.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6645
diff changeset
277 Preferences.getEditor("ShowMarkerSearch"))
4176
4c09d3d75768 Added capability to configure the indentation guides colors.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4164
diff changeset
278
4c09d3d75768 Added capability to configure the indentation guides colors.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4164
diff changeset
279 self.indentguidesCheckBox.setChecked(
4c09d3d75768 Added capability to configure the indentation guides colors.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4164
diff changeset
280 Preferences.getEditor("IndentationGuides"))
4c09d3d75768 Added capability to configure the indentation guides colors.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4164
diff changeset
281 self.initColour("IndentationGuidesBackground",
4c09d3d75768 Added capability to configure the indentation guides colors.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4164
diff changeset
282 self.indentationGuidesBackgroundButton,
4c09d3d75768 Added capability to configure the indentation guides colors.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4164
diff changeset
283 Preferences.getEditorColour)
4c09d3d75768 Added capability to configure the indentation guides colors.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4164
diff changeset
284 self.initColour("IndentationGuidesForeground",
4c09d3d75768 Added capability to configure the indentation guides colors.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4164
diff changeset
285 self.indentationGuidesForegroundButton,
4c09d3d75768 Added capability to configure the indentation guides colors.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4164
diff changeset
286 Preferences.getEditorColour)
6932
8a3df4c6ac9a Continued implementing the Python AST Viewer.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6843
diff changeset
287
8a3df4c6ac9a Continued implementing the Python AST Viewer.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6843
diff changeset
288 self.initColour("HighlightMarker",
8a3df4c6ac9a Continued implementing the Python AST Viewer.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6843
diff changeset
289 self.highlightingBackgroundButton,
8a3df4c6ac9a Continued implementing the Python AST Viewer.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6843
diff changeset
290 Preferences.getEditorColour,
8a3df4c6ac9a Continued implementing the Python AST Viewer.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6843
diff changeset
291 hasAlpha=True)
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
292
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
293 def save(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
294 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
295 Public slot to save the Editor Styles configuration.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
296 """
2905
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
297 Preferences.setEditor(
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
298 "FoldingStyle",
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
299 self.foldStyles[self.foldingStyleComboBox.currentIndex()])
2905
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
300 Preferences.setEditorOtherFonts(
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
301 "MarginsFont", self.marginsFont)
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
302 Preferences.setEditorOtherFonts(
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
303 "DefaultFont", self.defaultFont)
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
304 Preferences.setEditorOtherFonts(
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
305 "MonospacedFont", self.monospacedFont)
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
306 Preferences.setEditor(
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
307 "UseMonospacedFont", self.monospacedCheckBox.isChecked())
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
308
2905
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
309 Preferences.setEditor(
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
310 "LinenoMargin", self.linenoCheckBox.isChecked())
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
311 Preferences.setEditor(
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
312 "FoldingMargin", self.foldingCheckBox.isChecked())
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
313
2905
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
314 Preferences.setEditor(
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
315 "CaretLineVisible", self.caretlineVisibleCheckBox.isChecked())
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
316 Preferences.setEditor(
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
317 "CaretLineAlwaysVisible",
8fd7ae10de2b Implemented support for the new QScintilla feature to always highlight the caret line.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2964
diff changeset
318 self.caretlineAlwaysVisibleCheckBox.isChecked())
8fd7ae10de2b Implemented support for the new QScintilla feature to always highlight the caret line.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2964
diff changeset
319 Preferences.setEditor(
2905
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
320 "ColourizeSelText", self.colourizeSelTextCheckBox.isChecked())
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
321 Preferences.setEditor(
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
322 "CustomSelectionColours", self.customSelColourCheckBox.isChecked())
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
323 Preferences.setEditor(
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
324 "ExtendSelectionToEol", self.extentSelEolCheckBox.isChecked())
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
325 Preferences.setEditor(
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
326 "LineMarkersBackground",
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
327 self.debugMarkerBackgroundCheckBox.isChecked())
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
328
2905
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
329 Preferences.setEditor(
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
330 "CaretWidth", self.caretWidthSpinBox.value())
6843
5e1afd1577b9 Editor: added these capabilities
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6842
diff changeset
331 Preferences.setEditor(
5e1afd1577b9 Editor: added these capabilities
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6842
diff changeset
332 "CaretLineFrameWidth", self.caretlineFrameWidthSpinBox.value())
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
333
2905
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
334 Preferences.setEditor(
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
335 "ShowEOL", self.eolCheckBox.isChecked())
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
336 Preferences.setEditor(
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
337 "WrapLongLinesMode", self.wrapModeComboBox.itemData(
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
338 self.wrapModeComboBox.currentIndex()))
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
339 Preferences.setEditor(
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
340 "WrapVisualFlag", self.wrapVisualComboBox.itemData(
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
341 self.wrapVisualComboBox.currentIndex()))
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
342 Preferences.setEditor(
6842
c83dcb7c6147 Editor, MiniEditor: added capability to configure the subline indentation for wrapped lines.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6648
diff changeset
343 "WrapIndentMode", self.wrapIndentComboBox.itemData(
c83dcb7c6147 Editor, MiniEditor: added capability to configure the subline indentation for wrapped lines.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6648
diff changeset
344 self.wrapIndentComboBox.currentIndex()))
c83dcb7c6147 Editor, MiniEditor: added capability to configure the subline indentation for wrapped lines.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6648
diff changeset
345 Preferences.setEditor(
6843
5e1afd1577b9 Editor: added these capabilities
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6842
diff changeset
346 "WrapStartIndent", self.wrapStartIndentSpinBox.value())
5e1afd1577b9 Editor: added these capabilities
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6842
diff changeset
347 Preferences.setEditor(
2905
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
348 "EdgeMode", self.edgeModes[self.edgeModeCombo.currentIndex()])
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
349 Preferences.setEditor(
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
350 "EdgeColumn", self.edgeLineColumnSlider.value())
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
351
2905
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
352 Preferences.setEditor(
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
353 "BraceHighlighting", self.bracehighlightingCheckBox.isChecked())
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
354
2905
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
355 Preferences.setEditor(
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
356 "ZoomFactor", self.zoomfactorSlider.value())
230
2cde09c26384 Added code to configure the zoom factor a file is opened with.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 97
diff changeset
357
2905
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
358 Preferences.setEditor(
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
359 "ShowWhitespace", self.whitespaceCheckBox.isChecked())
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
360 Preferences.setEditor(
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
361 "WhitespaceSize", self.whitespaceSizeSpinBox.value())
939
10d3a201cd27 Added configuration options for visible whitespace (as of QScintilla 2.5).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 791
diff changeset
362
2905
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
363 Preferences.setEditor(
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
364 "MiniContextMenu", self.miniMenuCheckBox.isChecked())
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
365 Preferences.setEditor(
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
366 "HideFormatButtons", self.hideFormatButtonsCheckBox.isChecked())
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
367
2905
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
368 Preferences.setEditor(
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
369 "AnnotationsEnabled", self.enableAnnotationsCheckBox.isChecked())
729
090203934c19 Finished implementing the annotations support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
370
2905
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
371 Preferences.setEditor(
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
372 "OverrideEditAreaColours",
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
373 self.editAreaOverrideCheckBox.isChecked())
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
374
2905
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
375 Preferences.setEditor(
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
376 "OnlineChangeTrace", self.enableChangeTraceCheckBox.isChecked())
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
377 Preferences.setEditor(
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
378 "OnlineChangeTraceInterval",
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
379 self.changeTraceTimeoutSpinBox.value())
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
380
4176
4c09d3d75768 Added capability to configure the indentation guides colors.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4164
diff changeset
381 Preferences.setEditor(
4c09d3d75768 Added capability to configure the indentation guides colors.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4164
diff changeset
382 "IndentationGuides",
4c09d3d75768 Added capability to configure the indentation guides colors.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4164
diff changeset
383 self.indentguidesCheckBox.isChecked())
4c09d3d75768 Added capability to configure the indentation guides colors.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4164
diff changeset
384
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
385 Preferences.setEditor(
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
386 "ShowMarkerMapOnRight",
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
387 self.markerMapRightCheckBox.isChecked())
6648
c09e6c6006eb EditorMarkerMap: added cpability to suppress some markers in the marker map.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6645
diff changeset
388 Preferences.setEditor(
c09e6c6006eb EditorMarkerMap: added cpability to suppress some markers in the marker map.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6645
diff changeset
389 "ShowMarkerChanges",
c09e6c6006eb EditorMarkerMap: added cpability to suppress some markers in the marker map.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6645
diff changeset
390 self.changesMarkerCheckBox.isChecked())
c09e6c6006eb EditorMarkerMap: added cpability to suppress some markers in the marker map.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6645
diff changeset
391 Preferences.setEditor(
c09e6c6006eb EditorMarkerMap: added cpability to suppress some markers in the marker map.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6645
diff changeset
392 "ShowMarkerCoverage",
c09e6c6006eb EditorMarkerMap: added cpability to suppress some markers in the marker map.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6645
diff changeset
393 self.coverageMarkerCheckBox.isChecked())
c09e6c6006eb EditorMarkerMap: added cpability to suppress some markers in the marker map.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6645
diff changeset
394 Preferences.setEditor(
c09e6c6006eb EditorMarkerMap: added cpability to suppress some markers in the marker map.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6645
diff changeset
395 "ShowMarkerSearch",
c09e6c6006eb EditorMarkerMap: added cpability to suppress some markers in the marker map.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 6645
diff changeset
396 self.searchMarkerCheckBox.isChecked())
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
397
2230
2b1b9265156c Optimized the colour selection code of configuration pages.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2164
diff changeset
398 self.saveColours(Preferences.setEditorColour)
12
1d8dd9706f46 First commit after changing to Python 3.1.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 7
diff changeset
399 for key in list(self.editorColours.keys()):
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
400 Preferences.setEditorColour(key, self.editorColours[key])
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
401
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
402 @pyqtSlot()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
403 def on_linenumbersFontButton_clicked(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
404 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
405 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
406 """
2905
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
407 self.marginsFont = self.selectFont(
4674
41f716db325e Some enhancements of the configuration pages for the selection of fonts.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
408 self.marginsFontSample, self.marginsFont,
4676
c65b401b775e Implemented a fix for the last change to work with Qt4/PyQt4.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4674
diff changeset
409 options=MonospacedFontsOption)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
410
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
411 @pyqtSlot()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
412 def on_defaultFontButton_clicked(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
413 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
414 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
415 """
2905
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
416 self.defaultFont = self.selectFont(
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
417 self.defaultFontSample, self.defaultFont)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
418
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
419 @pyqtSlot()
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
420 def on_monospacedFontButton_clicked(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
421 """
2905
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
422 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
423 font.
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
424 """
2905
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
425 self.monospacedFont = self.selectFont(
4674
41f716db325e Some enhancements of the configuration pages for the selection of fonts.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4631
diff changeset
426 self.monospacedFontSample, self.monospacedFont,
4676
c65b401b775e Implemented a fix for the last change to work with Qt4/PyQt4.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 4674
diff changeset
427 options=MonospacedFontsOption)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
428
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
429 def polishPage(self):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
430 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
431 Public slot to perform some polishing actions.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
432 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
433 self.marginsFontSample.setFont(self.marginsFont)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
434 self.defaultFontSample.setFont(self.defaultFont)
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
435 self.monospacedFontSample.setFont(self.monospacedFont)
729
090203934c19 Finished implementing the annotations support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
436
090203934c19 Finished implementing the annotations support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
437 pl = self.annotationsWarningSample.palette()
2905
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
438 pl.setColor(QPalette.Text,
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
439 self.editorColours["AnnotationsWarningForeground"])
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
440 pl.setColor(QPalette.Base,
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
441 self.editorColours["AnnotationsWarningBackground"])
729
090203934c19 Finished implementing the annotations support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
442 self.annotationsWarningSample.setPalette(pl)
090203934c19 Finished implementing the annotations support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
443 self.annotationsWarningSample.repaint()
090203934c19 Finished implementing the annotations support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
444
090203934c19 Finished implementing the annotations support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
445 pl = self.annotationsErrorSample.palette()
2905
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
446 pl.setColor(QPalette.Text,
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
447 self.editorColours["AnnotationsErrorForeground"])
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
448 pl.setColor(QPalette.Base,
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
449 self.editorColours["AnnotationsErrorBackground"])
729
090203934c19 Finished implementing the annotations support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
450 self.annotationsErrorSample.setPalette(pl)
090203934c19 Finished implementing the annotations support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
451 self.annotationsErrorSample.repaint()
2905
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
452
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
453 pl = self.annotationsStyleWarningSample.palette()
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
454 pl.setColor(QPalette.Text,
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
455 self.editorColours["AnnotationsStyleForeground"])
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
456 pl.setColor(QPalette.Base,
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
457 self.editorColours["AnnotationsStyleBackground"])
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
458 self.annotationsStyleWarningSample.setPalette(pl)
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
459 self.annotationsStyleWarningSample.repaint()
729
090203934c19 Finished implementing the annotations support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
460
090203934c19 Finished implementing the annotations support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
461 @pyqtSlot()
090203934c19 Finished implementing the annotations support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
462 def on_annotationsWarningFgButton_clicked(self):
090203934c19 Finished implementing the annotations support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
463 """
090203934c19 Finished implementing the annotations support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
464 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
465 """
2905
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
466 colour = QColorDialog.getColor(
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
467 self.editorColours["AnnotationsWarningForeground"])
729
090203934c19 Finished implementing the annotations support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
468 if colour.isValid():
090203934c19 Finished implementing the annotations support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
469 pl = self.annotationsWarningSample.palette()
090203934c19 Finished implementing the annotations support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
470 pl.setColor(QPalette.Text, colour)
090203934c19 Finished implementing the annotations support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
471 self.annotationsWarningSample.setPalette(pl)
090203934c19 Finished implementing the annotations support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
472 self.annotationsWarningSample.repaint()
090203934c19 Finished implementing the annotations support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
473 self.editorColours["AnnotationsWarningForeground"] = colour
090203934c19 Finished implementing the annotations support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
474
090203934c19 Finished implementing the annotations support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
475 @pyqtSlot()
090203934c19 Finished implementing the annotations support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
476 def on_annotationsWarningBgButton_clicked(self):
090203934c19 Finished implementing the annotations support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
477 """
090203934c19 Finished implementing the annotations support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
478 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
479 """
2905
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
480 colour = QColorDialog.getColor(
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
481 self.editorColours["AnnotationsWarningBackground"])
729
090203934c19 Finished implementing the annotations support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
482 if colour.isValid():
090203934c19 Finished implementing the annotations support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
483 pl = self.annotationsWarningSample.palette()
090203934c19 Finished implementing the annotations support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
484 pl.setColor(QPalette.Base, colour)
090203934c19 Finished implementing the annotations support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
485 self.annotationsWarningSample.setPalette(pl)
090203934c19 Finished implementing the annotations support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
486 self.annotationsWarningSample.repaint()
090203934c19 Finished implementing the annotations support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
487 self.editorColours["AnnotationsWarningBackground"] = colour
090203934c19 Finished implementing the annotations support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
488
090203934c19 Finished implementing the annotations support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
489 @pyqtSlot()
090203934c19 Finished implementing the annotations support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
490 def on_annotationsErrorFgButton_clicked(self):
090203934c19 Finished implementing the annotations support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
491 """
090203934c19 Finished implementing the annotations support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
492 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
493 """
2905
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
494 colour = QColorDialog.getColor(
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
495 self.editorColours["AnnotationsErrorForeground"])
729
090203934c19 Finished implementing the annotations support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
496 if colour.isValid():
090203934c19 Finished implementing the annotations support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
497 pl = self.annotationsErrorSample.palette()
090203934c19 Finished implementing the annotations support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
498 pl.setColor(QPalette.Text, colour)
090203934c19 Finished implementing the annotations support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
499 self.annotationsErrorSample.setPalette(pl)
090203934c19 Finished implementing the annotations support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
500 self.annotationsErrorSample.repaint()
090203934c19 Finished implementing the annotations support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
501 self.editorColours["AnnotationsErrorForeground"] = colour
090203934c19 Finished implementing the annotations support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
502
090203934c19 Finished implementing the annotations support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
503 @pyqtSlot()
090203934c19 Finished implementing the annotations support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
504 def on_annotationsErrorBgButton_clicked(self):
090203934c19 Finished implementing the annotations support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
505 """
090203934c19 Finished implementing the annotations support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
506 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
507 """
2905
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
508 colour = QColorDialog.getColor(
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
509 self.editorColours["AnnotationsErrorBackground"])
729
090203934c19 Finished implementing the annotations support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
510 if colour.isValid():
090203934c19 Finished implementing the annotations support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
511 pl = self.annotationsErrorSample.palette()
090203934c19 Finished implementing the annotations support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
512 pl.setColor(QPalette.Base, colour)
090203934c19 Finished implementing the annotations support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
513 self.annotationsErrorSample.setPalette(pl)
090203934c19 Finished implementing the annotations support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
514 self.annotationsErrorSample.repaint()
090203934c19 Finished implementing the annotations support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
515 self.editorColours["AnnotationsErrorBackground"] = colour
2905
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
516
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
517 @pyqtSlot()
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
518 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
519 """
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
520 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
521 """
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
522 colour = QColorDialog.getColor(
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
523 self.editorColours["AnnotationsStyleForeground"])
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
524 if colour.isValid():
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
525 pl = self.annotationsStyleWarningSample.palette()
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
526 pl.setColor(QPalette.Text, colour)
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
527 self.annotationsStyleWarningSample.setPalette(pl)
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
528 self.annotationsStyleWarningSample.repaint()
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
529 self.editorColours["AnnotationsStyleForeground"] = colour
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
530
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
531 @pyqtSlot()
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
532 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
533 """
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
534 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
535 """
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
536 colour = QColorDialog.getColor(
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
537 self.editorColours["AnnotationsStyleBackground"])
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
538 if colour.isValid():
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
539 pl = self.annotationsStyleWarningSample.palette()
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
540 pl.setColor(QPalette.Base, colour)
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
541 self.annotationsStyleWarningSample.setPalette(pl)
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
542 self.annotationsStyleWarningSample.repaint()
a1ae4b297bc0 Added capability to have different warning styles to the editor.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2640
diff changeset
543 self.editorColours["AnnotationsStyleackground"] = colour
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
544
945
8cd4d08fa9f6 Made code mostly PEP 8 compliant (except all whitespace and line length).
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 942
diff changeset
545
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
546 def create(dlg):
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
547 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
548 Module function to create the configuration page.
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
549
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
550 @param dlg reference to the configuration dialog
2964
84b65fb9e780 Continued correcting doc strings by using the new doc string checker.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 2905
diff changeset
551 @return reference to the instantiated page (ConfigurationPageBase)
0
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
552 """
de9c2efb9d02 Started porting eric4 to Python3
Detlev Offenbach <detlev@die-offenbachs.de>
parents:
diff changeset
553 page = EditorStylesPage()
729
090203934c19 Finished implementing the annotations support.
Detlev Offenbach <detlev@die-offenbachs.de>
parents: 564
diff changeset
554 return page

eric ide

mercurial