Skip to content
Snippets Groups Projects
Commit 4f0d41e9 authored by Martyn Gigg's avatar Martyn Gigg
Browse files

Use 4 spaces for editor indentation.

Refs #21251
parent 3272b8ab
No related branches found
No related tags found
No related merge requests found
......@@ -33,8 +33,9 @@ from mantidqt.widgets.codeeditor.execution import PythonCodeExecution
IDLE_STATUS_MSG = "Status: Idle"
RUNNING_STATUS_MSG = "Status: Running"
# Editor colors
# Editor
CURRENTLINE_BKGD_COLOR = QColor(247, 236, 248)
TAB_WIDTH = 4
class PythonFileInterpreter(QWidget):
......@@ -71,6 +72,10 @@ class PythonFileInterpreter(QWidget):
def _setup_editor(self, default_content):
editor = self.editor
# use tabs not spaces for indentation
editor.setIndentationsUseTabs(False)
editor.setTabWidth(TAB_WIDTH)
# show current editing line but in a softer color
editor.setCaretLineBackgroundColor(CURRENTLINE_BKGD_COLOR)
editor.setCaretLineVisible(True)
......
......@@ -86,10 +86,12 @@ public:
void setCaretLineBackgroundColor (const QColor & col);
void setCaretLineVisible(bool enable);
void setIndentationsUseTabs(bool tabs);
void setFileName(const QString &filename);
void setMarginWidth(int margin, int width);
void setReadOnly(bool ro);
void setSelection(int lineFrom, int indexFrom, int lineTo, int indexTo);
void setTabWidth(int width);
void setText(const QString &text);
public slots:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment