141 Preferences.getEditor("BraceHighlighting")) |
141 Preferences.getEditor("BraceHighlighting")) |
142 self.editorColours["MatchingBrace"] = \ |
142 self.editorColours["MatchingBrace"] = \ |
143 self.initColour("MatchingBrace", self.matchingBracesButton, |
143 self.initColour("MatchingBrace", self.matchingBracesButton, |
144 Preferences.getEditorColour) |
144 Preferences.getEditorColour) |
145 self.editorColours["MatchingBraceBack"] = \ |
145 self.editorColours["MatchingBraceBack"] = \ |
146 self.initColour("MatchingBraceBack", self.matchingBracesBackButton, |
146 self.initColour("MatchingBraceBack", self.matchingBracesBackButton, |
147 Preferences.getEditorColour) |
147 Preferences.getEditorColour) |
148 self.editorColours["NonmatchingBrace"] = \ |
148 self.editorColours["NonmatchingBrace"] = \ |
149 self.initColour("NonmatchingBrace", self.nonmatchingBracesButton, |
149 self.initColour("NonmatchingBrace", self.nonmatchingBracesButton, |
150 Preferences.getEditorColour) |
150 Preferences.getEditorColour) |
151 self.editorColours["NonmatchingBraceBack"] = \ |
151 self.editorColours["NonmatchingBraceBack"] = \ |
155 self.zoomfactorSlider.setValue( |
155 self.zoomfactorSlider.setValue( |
156 Preferences.getEditor("ZoomFactor")) |
156 Preferences.getEditor("ZoomFactor")) |
157 |
157 |
158 self.whitespaceCheckBox.setChecked( |
158 self.whitespaceCheckBox.setChecked( |
159 Preferences.getEditor("ShowWhitespace")) |
159 Preferences.getEditor("ShowWhitespace")) |
|
160 self.whitespaceSizeSpinBox.setValue( |
|
161 Preferences.getEditor("WhitespaceSize")) |
|
162 self.editorColours["WhitespaceForeground"] = \ |
|
163 self.initColour("WhitespaceForeground", self.whitespaceForegroundButton, |
|
164 Preferences.getEditorColour) |
|
165 self.editorColours["WhitespaceBackground"] = \ |
|
166 self.initColour("WhitespaceBackground", self.whitespaceBackgroundButton, |
|
167 Preferences.getEditorColour) |
|
168 if not hasattr(QsciScintilla, "setWhitespaceForegroundColor"): |
|
169 self.whitespaceSizeSpinBox.setEnabled(False) |
|
170 self.whitespaceForegroundButton.setEnabled(False) |
|
171 self.whitespaceBackgroundButton.setEnabled(False) |
|
172 |
160 self.miniMenuCheckBox.setChecked( |
173 self.miniMenuCheckBox.setChecked( |
161 Preferences.getEditor("MiniContextMenu")) |
174 Preferences.getEditor("MiniContextMenu")) |
162 |
175 |
163 self.enableAnnotationsCheckBox.setChecked( |
176 self.enableAnnotationsCheckBox.setChecked( |
164 Preferences.getEditor("AnnotationsEnabled")) |
177 Preferences.getEditor("AnnotationsEnabled")) |
211 Preferences.setEditor("ZoomFactor", |
224 Preferences.setEditor("ZoomFactor", |
212 self.zoomfactorSlider.value()) |
225 self.zoomfactorSlider.value()) |
213 |
226 |
214 Preferences.setEditor("ShowWhitespace", |
227 Preferences.setEditor("ShowWhitespace", |
215 self.whitespaceCheckBox.isChecked()) |
228 self.whitespaceCheckBox.isChecked()) |
|
229 Preferences.setEditor("WhitespaceSize", |
|
230 self.whitespaceSizeSpinBox.value()) |
|
231 |
216 Preferences.setEditor("MiniContextMenu", |
232 Preferences.setEditor("MiniContextMenu", |
217 self.miniMenuCheckBox.isChecked()) |
233 self.miniMenuCheckBox.isChecked()) |
218 |
234 |
219 Preferences.setEditor("AnnotationsEnabled", |
235 Preferences.setEditor("AnnotationsEnabled", |
220 self.enableAnnotationsCheckBox.isChecked()) |
236 self.enableAnnotationsCheckBox.isChecked()) |
456 pl = self.annotationsErrorSample.palette() |
472 pl = self.annotationsErrorSample.palette() |
457 pl.setColor(QPalette.Base, colour) |
473 pl.setColor(QPalette.Base, colour) |
458 self.annotationsErrorSample.setPalette(pl) |
474 self.annotationsErrorSample.setPalette(pl) |
459 self.annotationsErrorSample.repaint() |
475 self.annotationsErrorSample.repaint() |
460 self.editorColours["AnnotationsErrorBackground"] = colour |
476 self.editorColours["AnnotationsErrorBackground"] = colour |
|
477 |
|
478 @pyqtSlot() |
|
479 def on_whitespaceForegroundButton_clicked(self): |
|
480 """ |
|
481 Private slot to set the foreground colour of visible whitespace. |
|
482 """ |
|
483 self.editorColours["WhitespaceForeground"] = \ |
|
484 self.selectColour(self.whitespaceForegroundButton, |
|
485 self.editorColours["WhitespaceForeground"]) |
|
486 |
|
487 @pyqtSlot() |
|
488 def on_whitespaceBackgroundButton_clicked(self): |
|
489 """ |
|
490 Private slot to set the background colour of visible whitespace. |
|
491 """ |
|
492 self.editorColours["WhitespaceBackground"] = \ |
|
493 self.selectColour(self.whitespaceBackgroundButton, |
|
494 self.editorColours["WhitespaceBackground"]) |
461 |
495 |
462 def create(dlg): |
496 def create(dlg): |
463 """ |
497 """ |
464 Module function to create the configuration page. |
498 Module function to create the configuration page. |
465 |
499 |