33 self.foldStyles = [ |
34 self.foldStyles = [ |
34 QsciScintilla.PlainFoldStyle, |
35 QsciScintilla.PlainFoldStyle, |
35 QsciScintilla.CircledFoldStyle, |
36 QsciScintilla.CircledFoldStyle, |
36 QsciScintilla.BoxedFoldStyle, |
37 QsciScintilla.BoxedFoldStyle, |
37 QsciScintilla.CircledTreeFoldStyle, |
38 QsciScintilla.CircledTreeFoldStyle, |
38 QsciScintilla.BoxedTreeFoldStyle, |
39 QsciScintilla.BoxedTreeFoldStyle, |
39 QsciScintillaCompat.ArrowFoldStyle, |
40 QsciScintillaCompat.ArrowFoldStyle, |
40 QsciScintillaCompat.ArrowTreeFoldStyle, |
41 QsciScintillaCompat.ArrowTreeFoldStyle, |
41 ] |
42 ] |
42 |
43 |
43 self.edgeModes = [ |
44 self.edgeModes = [ |
44 QsciScintilla.EdgeNone, |
45 QsciScintilla.EdgeNone, |
45 QsciScintilla.EdgeLine, |
46 QsciScintilla.EdgeLine, |
81 Preferences.getEditor("CustomSelectionColours")) |
82 Preferences.getEditor("CustomSelectionColours")) |
82 self.extentSelEolCheckBox.setChecked( |
83 self.extentSelEolCheckBox.setChecked( |
83 Preferences.getEditor("ExtendSelectionToEol")) |
84 Preferences.getEditor("ExtendSelectionToEol")) |
84 |
85 |
85 self.editorColours["CaretForeground"] = \ |
86 self.editorColours["CaretForeground"] = \ |
86 self.initColour("CaretForeground", self.caretForegroundButton, |
87 self.initColour("CaretForeground", self.caretForegroundButton, |
87 Preferences.getEditorColour) |
88 Preferences.getEditorColour) |
88 self.editorColours["CaretLineBackground"] = \ |
89 self.editorColours["CaretLineBackground"] = \ |
89 self.initColour("CaretLineBackground", self.caretlineBackgroundButton, |
90 self.initColour("CaretLineBackground", self.caretlineBackgroundButton, |
90 Preferences.getEditorColour) |
91 Preferences.getEditorColour) |
91 self.editorColours["SelectionForeground"] = \ |
92 self.editorColours["SelectionForeground"] = \ |
92 self.initColour("SelectionForeground", self.selectionForegroundButton, |
93 self.initColour("SelectionForeground", self.selectionForegroundButton, |
93 Preferences.getEditorColour) |
94 Preferences.getEditorColour) |
94 self.editorColours["SelectionBackground"] = \ |
95 self.editorColours["SelectionBackground"] = \ |
95 self.initColour("SelectionBackground", self.selectionBackgroundButton, |
96 self.initColour("SelectionBackground", self.selectionBackgroundButton, |
96 Preferences.getEditorColour) |
97 Preferences.getEditorColour) |
97 self.editorColours["CurrentMarker"] = \ |
98 self.editorColours["CurrentMarker"] = \ |
98 self.initColour("CurrentMarker", self.currentLineMarkerButton, |
99 self.initColour("CurrentMarker", self.currentLineMarkerButton, |
99 Preferences.getEditorColour) |
100 Preferences.getEditorColour) |
100 self.editorColours["ErrorMarker"] = \ |
101 self.editorColours["ErrorMarker"] = \ |
101 self.initColour("ErrorMarker", self.errorMarkerButton, |
102 self.initColour("ErrorMarker", self.errorMarkerButton, |
102 Preferences.getEditorColour) |
103 Preferences.getEditorColour) |
103 self.editorColours["MarginsForeground"] = \ |
104 self.editorColours["MarginsForeground"] = \ |
104 self.initColour("MarginsForeground", self.marginsForegroundButton, |
105 self.initColour("MarginsForeground", self.marginsForegroundButton, |
105 Preferences.getEditorColour) |
106 Preferences.getEditorColour) |
106 self.editorColours["MarginsBackground"] = \ |
107 self.editorColours["MarginsBackground"] = \ |
107 self.initColour("MarginsBackground", self.marginsBackgroundButton, |
108 self.initColour("MarginsBackground", self.marginsBackgroundButton, |
108 Preferences.getEditorColour) |
109 Preferences.getEditorColour) |
109 self.editorColours["FoldmarginBackground"] = \ |
110 self.editorColours["FoldmarginBackground"] = \ |
110 self.initColour("FoldmarginBackground", self.foldmarginBackgroundButton, |
111 self.initColour("FoldmarginBackground", self.foldmarginBackgroundButton, |
111 Preferences.getEditorColour) |
112 Preferences.getEditorColour) |
112 self.editorColours["FoldMarkersForeground"] = \ |
113 self.editorColours["FoldMarkersForeground"] = \ |
113 self.initColour("FoldMarkersForeground", self.foldmarkersForegroundButton, |
114 self.initColour("FoldMarkersForeground", self.foldmarkersForegroundButton, |
114 Preferences.getEditorColour) |
115 Preferences.getEditorColour) |
115 self.editorColours["FoldMarkersBackground"] = \ |
116 self.editorColours["FoldMarkersBackground"] = \ |
116 self.initColour("FoldMarkersBackground", self.foldmarkersBackgroundButton, |
117 self.initColour("FoldMarkersBackground", self.foldmarkersBackgroundButton, |
117 Preferences.getEditorColour) |
118 Preferences.getEditorColour) |
118 |
119 |
119 self.editorColours["AnnotationsWarningForeground"] = \ |
120 self.editorColours["AnnotationsWarningForeground"] = \ |
120 QColor(Preferences.getEditorColour("AnnotationsWarningForeground")) |
121 QColor(Preferences.getEditorColour("AnnotationsWarningForeground")) |
121 self.editorColours["AnnotationsWarningBackground"] = \ |
122 self.editorColours["AnnotationsWarningBackground"] = \ |
132 self.edgeModeCombo.setCurrentIndex( |
133 self.edgeModeCombo.setCurrentIndex( |
133 self.edgeModes.index(Preferences.getEditor("EdgeMode"))) |
134 self.edgeModes.index(Preferences.getEditor("EdgeMode"))) |
134 self.edgeLineColumnSlider.setValue( |
135 self.edgeLineColumnSlider.setValue( |
135 Preferences.getEditor("EdgeColumn")) |
136 Preferences.getEditor("EdgeColumn")) |
136 self.editorColours["Edge"] = \ |
137 self.editorColours["Edge"] = \ |
137 self.initColour("Edge", self.edgeBackgroundColorButton, |
138 self.initColour("Edge", self.edgeBackgroundColorButton, |
138 Preferences.getEditorColour) |
139 Preferences.getEditorColour) |
139 |
140 |
140 self.bracehighlightingCheckBox.setChecked( |
141 self.bracehighlightingCheckBox.setChecked( |
141 Preferences.getEditor("BraceHighlighting")) |
142 Preferences.getEditor("BraceHighlighting")) |
142 self.editorColours["MatchingBrace"] = \ |
143 self.editorColours["MatchingBrace"] = \ |
143 self.initColour("MatchingBrace", self.matchingBracesButton, |
144 self.initColour("MatchingBrace", self.matchingBracesButton, |
144 Preferences.getEditorColour) |
145 Preferences.getEditorColour) |
145 self.editorColours["MatchingBraceBack"] = \ |
146 self.editorColours["MatchingBraceBack"] = \ |
146 self.initColour("MatchingBraceBack", self.matchingBracesBackButton, |
147 self.initColour("MatchingBraceBack", self.matchingBracesBackButton, |
147 Preferences.getEditorColour) |
148 Preferences.getEditorColour) |
148 self.editorColours["NonmatchingBrace"] = \ |
149 self.editorColours["NonmatchingBrace"] = \ |
149 self.initColour("NonmatchingBrace", self.nonmatchingBracesButton, |
150 self.initColour("NonmatchingBrace", self.nonmatchingBracesButton, |
150 Preferences.getEditorColour) |
151 Preferences.getEditorColour) |
151 self.editorColours["NonmatchingBraceBack"] = \ |
152 self.editorColours["NonmatchingBraceBack"] = \ |
152 self.initColour("NonmatchingBraceBack", self.nonmatchingBracesBackButton, |
153 self.initColour("NonmatchingBraceBack", self.nonmatchingBracesBackButton, |
153 Preferences.getEditorColour) |
154 Preferences.getEditorColour) |
154 |
155 |
155 self.zoomfactorSlider.setValue( |
156 self.zoomfactorSlider.setValue( |
156 Preferences.getEditor("ZoomFactor")) |
157 Preferences.getEditor("ZoomFactor")) |
157 |
158 |
158 self.whitespaceCheckBox.setChecked( |
159 self.whitespaceCheckBox.setChecked( |
159 Preferences.getEditor("ShowWhitespace")) |
160 Preferences.getEditor("ShowWhitespace")) |
160 self.whitespaceSizeSpinBox.setValue( |
161 self.whitespaceSizeSpinBox.setValue( |
161 Preferences.getEditor("WhitespaceSize")) |
162 Preferences.getEditor("WhitespaceSize")) |
162 self.editorColours["WhitespaceForeground"] = \ |
163 self.editorColours["WhitespaceForeground"] = \ |
163 self.initColour("WhitespaceForeground", self.whitespaceForegroundButton, |
164 self.initColour("WhitespaceForeground", self.whitespaceForegroundButton, |
164 Preferences.getEditorColour) |
165 Preferences.getEditorColour) |
165 self.editorColours["WhitespaceBackground"] = \ |
166 self.editorColours["WhitespaceBackground"] = \ |
166 self.initColour("WhitespaceBackground", self.whitespaceBackgroundButton, |
167 self.initColour("WhitespaceBackground", self.whitespaceBackgroundButton, |
167 Preferences.getEditorColour) |
168 Preferences.getEditorColour) |
168 if not hasattr(QsciScintilla, "setWhitespaceForegroundColor"): |
169 if not hasattr(QsciScintilla, "setWhitespaceForegroundColor"): |
186 Preferences.setEditorOtherFonts("DefaultFont", self.defaultFont) |
187 Preferences.setEditorOtherFonts("DefaultFont", self.defaultFont) |
187 Preferences.setEditorOtherFonts("MonospacedFont", self.monospacedFont) |
188 Preferences.setEditorOtherFonts("MonospacedFont", self.monospacedFont) |
188 Preferences.setEditor("UseMonospacedFont", |
189 Preferences.setEditor("UseMonospacedFont", |
189 self.monospacedCheckBox.isChecked()) |
190 self.monospacedCheckBox.isChecked()) |
190 |
191 |
191 Preferences.setEditor("LinenoWidth", |
192 Preferences.setEditor("LinenoWidth", |
192 self.linenowidthSlider.value()) |
193 self.linenowidthSlider.value()) |
193 Preferences.setEditor("LinenoMargin", |
194 Preferences.setEditor("LinenoMargin", |
194 self.linenoCheckBox.isChecked()) |
195 self.linenoCheckBox.isChecked()) |
195 Preferences.setEditor("FoldingMargin", |
196 Preferences.setEditor("FoldingMargin", |
196 self.foldingCheckBox.isChecked()) |
197 self.foldingCheckBox.isChecked()) |
197 Preferences.setEditor("UnifiedMargins", |
198 Preferences.setEditor("UnifiedMargins", |
198 self.unifiedMarginsCheckBox.isChecked()) |
199 self.unifiedMarginsCheckBox.isChecked()) |
199 |
200 |
200 Preferences.setEditor("CaretLineVisible", |
201 Preferences.setEditor("CaretLineVisible", |
201 self.caretlineVisibleCheckBox.isChecked()) |
202 self.caretlineVisibleCheckBox.isChecked()) |
202 Preferences.setEditor("ColourizeSelText", |
203 Preferences.setEditor("ColourizeSelText", |
203 self.colourizeSelTextCheckBox.isChecked()) |
204 self.colourizeSelTextCheckBox.isChecked()) |
204 Preferences.setEditor("CustomSelectionColours", |
205 Preferences.setEditor("CustomSelectionColours", |
205 self.customSelColourCheckBox.isChecked()) |
206 self.customSelColourCheckBox.isChecked()) |
206 Preferences.setEditor("ExtendSelectionToEol", |
207 Preferences.setEditor("ExtendSelectionToEol", |
207 self.extentSelEolCheckBox.isChecked()) |
208 self.extentSelEolCheckBox.isChecked()) |
208 |
209 |
209 Preferences.setEditor("CaretWidth", |
210 Preferences.setEditor("CaretWidth", |
210 self.caretWidthSpinBox.value()) |
211 self.caretWidthSpinBox.value()) |
211 |
212 |
212 Preferences.setEditor("ShowEOL", |
213 Preferences.setEditor("ShowEOL", |
213 self.eolCheckBox.isChecked()) |
214 self.eolCheckBox.isChecked()) |
214 Preferences.setEditor("WrapLongLines", |
215 Preferences.setEditor("WrapLongLines", |
215 self.wrapLongLinesCheckBox.isChecked()) |
216 self.wrapLongLinesCheckBox.isChecked()) |
216 Preferences.setEditor("EdgeMode", |
217 Preferences.setEditor("EdgeMode", |
217 self.edgeModes[self.edgeModeCombo.currentIndex()]) |
218 self.edgeModes[self.edgeModeCombo.currentIndex()]) |
219 self.edgeLineColumnSlider.value()) |
220 self.edgeLineColumnSlider.value()) |
220 |
221 |
221 Preferences.setEditor("BraceHighlighting", |
222 Preferences.setEditor("BraceHighlighting", |
222 self.bracehighlightingCheckBox.isChecked()) |
223 self.bracehighlightingCheckBox.isChecked()) |
223 |
224 |
224 Preferences.setEditor("ZoomFactor", |
225 Preferences.setEditor("ZoomFactor", |
225 self.zoomfactorSlider.value()) |
226 self.zoomfactorSlider.value()) |
226 |
227 |
227 Preferences.setEditor("ShowWhitespace", |
228 Preferences.setEditor("ShowWhitespace", |
228 self.whitespaceCheckBox.isChecked()) |
229 self.whitespaceCheckBox.isChecked()) |
229 Preferences.setEditor("WhitespaceSize", |
230 Preferences.setEditor("WhitespaceSize", |
230 self.whitespaceSizeSpinBox.value()) |
231 self.whitespaceSizeSpinBox.value()) |
231 |
232 |
232 Preferences.setEditor("MiniContextMenu", |
233 Preferences.setEditor("MiniContextMenu", |
233 self.miniMenuCheckBox.isChecked()) |
234 self.miniMenuCheckBox.isChecked()) |
234 |
235 |
235 Preferences.setEditor("AnnotationsEnabled", |
236 Preferences.setEditor("AnnotationsEnabled", |
236 self.enableAnnotationsCheckBox.isChecked()) |
237 self.enableAnnotationsCheckBox.isChecked()) |
237 |
238 |
238 for key in list(self.editorColours.keys()): |
239 for key in list(self.editorColours.keys()): |
239 Preferences.setEditorColour(key, self.editorColours[key]) |
240 Preferences.setEditorColour(key, self.editorColours[key]) |
240 |
241 |
264 def on_caretForegroundButton_clicked(self): |
265 def on_caretForegroundButton_clicked(self): |
265 """ |
266 """ |
266 Private slot to set the foreground colour of the caret. |
267 Private slot to set the foreground colour of the caret. |
267 """ |
268 """ |
268 self.editorColours["CaretForeground"] = \ |
269 self.editorColours["CaretForeground"] = \ |
269 self.selectColour(self.caretForegroundButton, |
270 self.selectColour(self.caretForegroundButton, |
270 self.editorColours["CaretForeground"]) |
271 self.editorColours["CaretForeground"]) |
271 |
272 |
272 @pyqtSlot() |
273 @pyqtSlot() |
273 def on_caretlineBackgroundButton_clicked(self): |
274 def on_caretlineBackgroundButton_clicked(self): |
274 """ |
275 """ |
275 Private slot to set the background colour of the caretline. |
276 Private slot to set the background colour of the caretline. |
276 """ |
277 """ |
277 self.editorColours["CaretLineBackground"] = \ |
278 self.editorColours["CaretLineBackground"] = \ |
278 self.selectColour(self.caretlineBackgroundButton, |
279 self.selectColour(self.caretlineBackgroundButton, |
279 self.editorColours["CaretLineBackground"], True) |
280 self.editorColours["CaretLineBackground"], True) |
280 |
281 |
281 @pyqtSlot() |
282 @pyqtSlot() |
282 def on_selectionForegroundButton_clicked(self): |
283 def on_selectionForegroundButton_clicked(self): |
283 """ |
284 """ |
284 Private slot to set the foreground colour of the selection. |
285 Private slot to set the foreground colour of the selection. |
285 """ |
286 """ |
286 self.editorColours["SelectionForeground"] = \ |
287 self.editorColours["SelectionForeground"] = \ |
287 self.selectColour(self.selectionForegroundButton, |
288 self.selectColour(self.selectionForegroundButton, |
288 self.editorColours["SelectionForeground"]) |
289 self.editorColours["SelectionForeground"]) |
289 |
290 |
290 @pyqtSlot() |
291 @pyqtSlot() |
291 def on_selectionBackgroundButton_clicked(self): |
292 def on_selectionBackgroundButton_clicked(self): |
292 """ |
293 """ |
293 Private slot to set the background colour of the selection. |
294 Private slot to set the background colour of the selection. |
294 """ |
295 """ |
295 self.editorColours["SelectionBackground"] = \ |
296 self.editorColours["SelectionBackground"] = \ |
296 self.selectColour(self.selectionBackgroundButton, |
297 self.selectColour(self.selectionBackgroundButton, |
297 self.editorColours["SelectionBackground"], True) |
298 self.editorColours["SelectionBackground"], True) |
298 |
299 |
299 @pyqtSlot() |
300 @pyqtSlot() |
300 def on_currentLineMarkerButton_clicked(self): |
301 def on_currentLineMarkerButton_clicked(self): |
301 """ |
302 """ |
302 Private slot to set the colour for the highlight of the current line. |
303 Private slot to set the colour for the highlight of the current line. |
303 """ |
304 """ |
304 self.editorColours["CurrentMarker"] = \ |
305 self.editorColours["CurrentMarker"] = \ |
305 self.selectColour(self.currentLineMarkerButton, |
306 self.selectColour(self.currentLineMarkerButton, |
306 self.editorColours["CurrentMarker"], True) |
307 self.editorColours["CurrentMarker"], True) |
307 |
308 |
308 @pyqtSlot() |
309 @pyqtSlot() |
309 def on_errorMarkerButton_clicked(self): |
310 def on_errorMarkerButton_clicked(self): |
310 """ |
311 """ |
311 Private slot to set the colour for the highlight of the error line. |
312 Private slot to set the colour for the highlight of the error line. |
312 """ |
313 """ |
313 self.editorColours["ErrorMarker"] = \ |
314 self.editorColours["ErrorMarker"] = \ |
314 self.selectColour(self.errorMarkerButton, |
315 self.selectColour(self.errorMarkerButton, |
315 self.editorColours["ErrorMarker"], True) |
316 self.editorColours["ErrorMarker"], True) |
316 |
317 |
317 @pyqtSlot() |
318 @pyqtSlot() |
318 def on_marginsForegroundButton_clicked(self): |
319 def on_marginsForegroundButton_clicked(self): |
319 """ |
320 """ |
320 Private slot to set the foreground colour for the margins. |
321 Private slot to set the foreground colour for the margins. |
321 """ |
322 """ |
322 self.editorColours["MarginsForeground"] = \ |
323 self.editorColours["MarginsForeground"] = \ |
323 self.selectColour(self.marginsForegroundButton, |
324 self.selectColour(self.marginsForegroundButton, |
324 self.editorColours["MarginsForeground"]) |
325 self.editorColours["MarginsForeground"]) |
325 |
326 |
326 @pyqtSlot() |
327 @pyqtSlot() |
327 def on_marginsBackgroundButton_clicked(self): |
328 def on_marginsBackgroundButton_clicked(self): |
328 """ |
329 """ |
329 Private slot to set the background colour for the margins. |
330 Private slot to set the background colour for the margins. |
330 """ |
331 """ |
331 self.editorColours["MarginsBackground"] = \ |
332 self.editorColours["MarginsBackground"] = \ |
332 self.selectColour(self.marginsBackgroundButton, |
333 self.selectColour(self.marginsBackgroundButton, |
333 self.editorColours["MarginsBackground"]) |
334 self.editorColours["MarginsBackground"]) |
334 |
335 |
335 @pyqtSlot() |
336 @pyqtSlot() |
336 def on_foldmarginBackgroundButton_clicked(self): |
337 def on_foldmarginBackgroundButton_clicked(self): |
337 """ |
338 """ |
338 Private slot to set the background colour for the foldmargin. |
339 Private slot to set the background colour for the foldmargin. |
339 """ |
340 """ |
340 self.editorColours["FoldmarginBackground"] = \ |
341 self.editorColours["FoldmarginBackground"] = \ |
341 self.selectColour(self.foldmarginBackgroundButton, |
342 self.selectColour(self.foldmarginBackgroundButton, |
342 self.editorColours["FoldmarginBackground"]) |
343 self.editorColours["FoldmarginBackground"]) |
343 |
344 |
344 @pyqtSlot() |
345 @pyqtSlot() |
345 def on_edgeBackgroundColorButton_clicked(self): |
346 def on_edgeBackgroundColorButton_clicked(self): |
346 """ |
347 """ |
353 def on_matchingBracesButton_clicked(self): |
354 def on_matchingBracesButton_clicked(self): |
354 """ |
355 """ |
355 Private slot to set the colour for highlighting matching braces. |
356 Private slot to set the colour for highlighting matching braces. |
356 """ |
357 """ |
357 self.editorColours["MatchingBrace"] = \ |
358 self.editorColours["MatchingBrace"] = \ |
358 self.selectColour(self.matchingBracesButton, |
359 self.selectColour(self.matchingBracesButton, |
359 self.editorColours["MatchingBrace"]) |
360 self.editorColours["MatchingBrace"]) |
360 |
361 |
361 @pyqtSlot() |
362 @pyqtSlot() |
362 def on_matchingBracesBackButton_clicked(self): |
363 def on_matchingBracesBackButton_clicked(self): |
363 """ |
364 """ |
364 Private slot to set the background colour for highlighting matching braces. |
365 Private slot to set the background colour for highlighting matching braces. |
365 """ |
366 """ |
366 self.editorColours["MatchingBraceBack"] = \ |
367 self.editorColours["MatchingBraceBack"] = \ |
367 self.selectColour(self.matchingBracesBackButton, |
368 self.selectColour(self.matchingBracesBackButton, |
368 self.editorColours["MatchingBraceBack"]) |
369 self.editorColours["MatchingBraceBack"]) |
369 |
370 |
370 @pyqtSlot() |
371 @pyqtSlot() |
371 def on_nonmatchingBracesButton_clicked(self): |
372 def on_nonmatchingBracesButton_clicked(self): |
372 """ |
373 """ |
373 Private slot to set the colour for highlighting nonmatching braces. |
374 Private slot to set the colour for highlighting nonmatching braces. |
374 """ |
375 """ |
375 self.editorColours["NonmatchingBrace"] = \ |
376 self.editorColours["NonmatchingBrace"] = \ |
376 self.selectColour(self.nonmatchingBracesButton, |
377 self.selectColour(self.nonmatchingBracesButton, |
377 self.editorColours["NonmatchingBrace"]) |
378 self.editorColours["NonmatchingBrace"]) |
378 |
379 |
379 @pyqtSlot() |
380 @pyqtSlot() |
380 def on_nonmatchingBracesBackButton_clicked(self): |
381 def on_nonmatchingBracesBackButton_clicked(self): |
381 """ |
382 """ |
382 Private slot to set the background colour for highlighting nonmatching braces. |
383 Private slot to set the background colour for highlighting nonmatching braces. |
383 """ |
384 """ |
384 self.editorColours["NonmatchingBraceBack"] = \ |
385 self.editorColours["NonmatchingBraceBack"] = \ |
385 self.selectColour(self.nonmatchingBracesBackButton, |
386 self.selectColour(self.nonmatchingBracesBackButton, |
386 self.editorColours["NonmatchingBraceBack"]) |
387 self.editorColours["NonmatchingBraceBack"]) |
387 |
388 |
388 @pyqtSlot() |
389 @pyqtSlot() |
389 def on_foldmarkersForegroundButton_clicked(self): |
390 def on_foldmarkersForegroundButton_clicked(self): |
390 """ |
391 """ |
391 Private slot to set the foreground colour for the foldmarkers. |
392 Private slot to set the foreground colour for the foldmarkers. |
392 """ |
393 """ |
393 self.editorColours["FoldMarkersForeground"] = \ |
394 self.editorColours["FoldMarkersForeground"] = \ |
394 self.selectColour(self.foldmarkersForegroundButton, |
395 self.selectColour(self.foldmarkersForegroundButton, |
395 self.editorColours["FoldMarkersForeground"]) |
396 self.editorColours["FoldMarkersForeground"]) |
396 |
397 |
397 @pyqtSlot() |
398 @pyqtSlot() |
398 def on_foldmarkersBackgroundButton_clicked(self): |
399 def on_foldmarkersBackgroundButton_clicked(self): |
399 """ |
400 """ |
400 Private slot to set the background colour for the margins. |
401 Private slot to set the background colour for the margins. |
401 """ |
402 """ |
402 self.editorColours["FoldMarkersBackground"] = \ |
403 self.editorColours["FoldMarkersBackground"] = \ |
403 self.selectColour(self.foldmarkersBackgroundButton, |
404 self.selectColour(self.foldmarkersBackgroundButton, |
404 self.editorColours["FoldMarkersBackground"]) |
405 self.editorColours["FoldMarkersBackground"]) |
405 |
406 |
406 def polishPage(self): |
407 def polishPage(self): |
407 """ |
408 """ |
408 Public slot to perform some polishing actions. |
409 Public slot to perform some polishing actions. |
479 def on_whitespaceForegroundButton_clicked(self): |
480 def on_whitespaceForegroundButton_clicked(self): |
480 """ |
481 """ |
481 Private slot to set the foreground colour of visible whitespace. |
482 Private slot to set the foreground colour of visible whitespace. |
482 """ |
483 """ |
483 self.editorColours["WhitespaceForeground"] = \ |
484 self.editorColours["WhitespaceForeground"] = \ |
484 self.selectColour(self.whitespaceForegroundButton, |
485 self.selectColour(self.whitespaceForegroundButton, |
485 self.editorColours["WhitespaceForeground"]) |
486 self.editorColours["WhitespaceForeground"]) |
486 |
487 |
487 @pyqtSlot() |
488 @pyqtSlot() |
488 def on_whitespaceBackgroundButton_clicked(self): |
489 def on_whitespaceBackgroundButton_clicked(self): |
489 """ |
490 """ |
490 Private slot to set the background colour of visible whitespace. |
491 Private slot to set the background colour of visible whitespace. |
491 """ |
492 """ |
492 self.editorColours["WhitespaceBackground"] = \ |
493 self.editorColours["WhitespaceBackground"] = \ |
493 self.selectColour(self.whitespaceBackgroundButton, |
494 self.selectColour(self.whitespaceBackgroundButton, |
494 self.editorColours["WhitespaceBackground"]) |
495 self.editorColours["WhitespaceBackground"]) |
|
496 |
495 |
497 |
496 def create(dlg): |
498 def create(dlg): |
497 """ |
499 """ |
498 Module function to create the configuration page. |
500 Module function to create the configuration page. |
499 |
501 |