Preferences/ConfigurationPages/EditorStylesPage.py

changeset 1566
0cb791cc631a
parent 1509
c0b5e693b0eb
child 2162
4627e6ea7b6b
equal deleted inserted replaced
1563:9d2cccd2074e 1566:0cb791cc631a
175 Preferences.getEditor("MiniContextMenu")) 175 Preferences.getEditor("MiniContextMenu"))
176 176
177 self.enableAnnotationsCheckBox.setChecked( 177 self.enableAnnotationsCheckBox.setChecked(
178 Preferences.getEditor("AnnotationsEnabled")) 178 Preferences.getEditor("AnnotationsEnabled"))
179 179
180 self.editAreaOverrideCheckBox.setChecked(
181 Preferences.getEditor("OverrideEditAreaColours"))
182 self.editorColours["EditAreaForeground"] = \
183 self.initColour("EditAreaForeground", self.editAreaForegroundButton,
184 Preferences.getEditorColour)
185 self.editorColours["EditAreaBackground"] = \
186 self.initColour("EditAreaBackground", self.editAreaBackgroundButton,
187 Preferences.getEditorColour)
188
180 def save(self): 189 def save(self):
181 """ 190 """
182 Public slot to save the Editor Styles configuration. 191 Public slot to save the Editor Styles configuration.
183 """ 192 """
184 Preferences.setEditor("FoldingStyle", 193 Preferences.setEditor("FoldingStyle",
234 self.miniMenuCheckBox.isChecked()) 243 self.miniMenuCheckBox.isChecked())
235 244
236 Preferences.setEditor("AnnotationsEnabled", 245 Preferences.setEditor("AnnotationsEnabled",
237 self.enableAnnotationsCheckBox.isChecked()) 246 self.enableAnnotationsCheckBox.isChecked())
238 247
248 Preferences.setEditor("OverrideEditAreaColours",
249 self.editAreaOverrideCheckBox.isChecked())
250
239 for key in list(self.editorColours.keys()): 251 for key in list(self.editorColours.keys()):
240 Preferences.setEditorColour(key, self.editorColours[key]) 252 Preferences.setEditorColour(key, self.editorColours[key])
241 253
242 @pyqtSlot() 254 @pyqtSlot()
243 def on_linenumbersFontButton_clicked(self): 255 def on_linenumbersFontButton_clicked(self):
491 Private slot to set the background colour of visible whitespace. 503 Private slot to set the background colour of visible whitespace.
492 """ 504 """
493 self.editorColours["WhitespaceBackground"] = \ 505 self.editorColours["WhitespaceBackground"] = \
494 self.selectColour(self.whitespaceBackgroundButton, 506 self.selectColour(self.whitespaceBackgroundButton,
495 self.editorColours["WhitespaceBackground"]) 507 self.editorColours["WhitespaceBackground"])
508
509 @pyqtSlot()
510 def on_editAreaForegroundButton_clicked(self):
511 """
512 Private slot to set the foreground colour of the edit area.
513 """
514 self.editorColours["EditAreaForeground"] = \
515 self.selectColour(self.editAreaForegroundButton,
516 self.editorColours["EditAreaForeground"])
517
518 @pyqtSlot()
519 def on_editAreaBackgroundButton_clicked(self):
520 """
521 Private slot to set the background colour of the edit area.
522 """
523 self.editorColours["EditAreaBackground"] = \
524 self.selectColour(self.editAreaBackgroundButton,
525 self.editorColours["EditAreaBackground"])
496 526
497 527
498 def create(dlg): 528 def create(dlg):
499 """ 529 """
500 Module function to create the configuration page. 530 Module function to create the configuration page.

eric ide

mercurial