Preferences/ConfigurationPages/EditorStylesPage.py

changeset 4176
4c09d3d75768
parent 4164
daae068f48b5
child 4304
f85965649066
equal deleted inserted replaced
4175:4db8023ccf32 4176:4c09d3d75768
22 22
23 class EditorStylesPage(ConfigurationPageBase, Ui_EditorStylesPage): 23 class EditorStylesPage(ConfigurationPageBase, Ui_EditorStylesPage):
24 """ 24 """
25 Class implementing the Editor Styles configuration page. 25 Class implementing the Editor Styles configuration page.
26 """ 26 """
27 # TODO: configure foreground and background of indentation guides
28 # setIndentationGuidesBackgroundColor, setIndentationGuidesForegroundColor
29 def __init__(self): 27 def __init__(self):
30 """ 28 """
31 Constructor 29 Constructor
32 """ 30 """
33 super(EditorStylesPage, self).__init__() 31 super(EditorStylesPage, self).__init__()
242 self.currentMapButton, 240 self.currentMapButton,
243 Preferences.getEditorColour) 241 Preferences.getEditorColour)
244 self.initColour("MarkerMapBackground", 242 self.initColour("MarkerMapBackground",
245 self.markerMapBackgroundButton, 243 self.markerMapBackgroundButton,
246 Preferences.getEditorColour) 244 Preferences.getEditorColour)
245
246 self.indentguidesCheckBox.setChecked(
247 Preferences.getEditor("IndentationGuides"))
248 self.initColour("IndentationGuidesBackground",
249 self.indentationGuidesBackgroundButton,
250 Preferences.getEditorColour)
251 self.initColour("IndentationGuidesForeground",
252 self.indentationGuidesForegroundButton,
253 Preferences.getEditorColour)
247 254
248 def save(self): 255 def save(self):
249 """ 256 """
250 Public slot to save the Editor Styles configuration. 257 Public slot to save the Editor Styles configuration.
251 """ 258 """
321 "OnlineChangeTrace", self.enableChangeTraceCheckBox.isChecked()) 328 "OnlineChangeTrace", self.enableChangeTraceCheckBox.isChecked())
322 Preferences.setEditor( 329 Preferences.setEditor(
323 "OnlineChangeTraceInterval", 330 "OnlineChangeTraceInterval",
324 self.changeTraceTimeoutSpinBox.value()) 331 self.changeTraceTimeoutSpinBox.value())
325 332
333 Preferences.setEditor(
334 "IndentationGuides",
335 self.indentguidesCheckBox.isChecked())
336
326 self.saveColours(Preferences.setEditorColour) 337 self.saveColours(Preferences.setEditorColour)
327 for key in list(self.editorColours.keys()): 338 for key in list(self.editorColours.keys()):
328 Preferences.setEditorColour(key, self.editorColours[key]) 339 Preferences.setEditorColour(key, self.editorColours[key])
329 340
330 @pyqtSlot() 341 @pyqtSlot()

eric ide

mercurial