tab position marks in editors

This commit is contained in:
Vadim Lopatin 2016-06-28 14:21:06 +03:00
parent db9b49f2c3
commit 6321fdb69d
4 changed files with 14 additions and 3 deletions

View File

@ -12,7 +12,7 @@
"stringImportPaths": ["views", "views/res", "views/res/i18n", "views/res/mdpi", "views/res/hdpi"],
"dependencies": {
"dlangui": "==0.8.30",
"dlangui": "==0.8.31",
"dcd": "~>0.8.0"
},

View File

@ -50,6 +50,7 @@ class DSourceEdit : SourceEdit, EditableContentMarksChangeListener {
showIcons = true;
//showFolding = true;
showWhiteSpaceMarks = true;
showTabPositionMarks = true;
content.marksChanged = this;
}
@ -89,6 +90,7 @@ class DSourceEdit : SourceEdit, EditableContentMarksChangeListener {
smartIndents = _settings.smartIndents;
smartIndentsAfterPaste = _settings.smartIndentsAfterPaste;
showWhiteSpaceMarks = _settings.showWhiteSpaceMarks;
showTabPositionMarks = _settings.showTabPositionMarks;
}
protected EditorTool _editorTool;

View File

@ -63,6 +63,7 @@ SettingsPage createSettingsPages() {
texted.addCheckbox("editors/textEditor/smartIndents", UIString("Smart indents"d));
texted.addCheckbox("editors/textEditor/smartIndentsAfterPaste", UIString("Smart indent after paste"d));
texted.addCheckbox("editors/textEditor/showWhiteSpaceMarks", UIString("Show white space marks"d));
texted.addCheckbox("editors/textEditor/showTabPositionMarks", UIString("Show tab position marks"d));
SettingsPage dlang = res.addChild("dlang", UIString("D"d));
SettingsPage dub = dlang.addChild("dlang/dub", UIString("DUB"d));

View File

@ -22,6 +22,7 @@ class IDESettings : SettingsFile {
ed.setBooleanDef("smartIndents", true);
ed.setBooleanDef("smartIndentsAfterPaste", true);
ed.setBooleanDef("showWhiteSpaceMarks", true);
ed.setBooleanDef("showTabPositionMarks", true);
Setting ui = uiSettings();
ui.setStringDef("theme", "ide_theme_default");
ui.setStringDef("language", "en");
@ -147,11 +148,18 @@ class IDESettings : SettingsFile {
/// set smart indents enabled flag
@property IDESettings smartIndents(bool enabled) { editorSettings.setBoolean("smartIndents", enabled); return this; }
/// true if smart indents are enabled
/// true if white space marks are enabled
@property bool showWhiteSpaceMarks() { return editorSettings.getBoolean("showWhiteSpaceMarks", true); }
/// set smart indents enabled flag
/// set white space marks enabled flag
@property IDESettings showWhiteSpaceMarks(bool enabled) { editorSettings.setBoolean("showWhiteSpaceMarks", enabled); return this; }
/// true if tab position marks are enabled
@property bool showTabPositionMarks() { return editorSettings.getBoolean("showTabPositionMarks", true); }
/// set tab position marks enabled flag
@property IDESettings showTabPositionMarks(bool enabled) { editorSettings.setBoolean("showTabPositionMarks", enabled); return this; }
/// true if smart indents are enabled
@property bool smartIndentsAfterPaste() { return editorSettings.getBoolean("smartIndentsAfterPaste", true); }
/// set smart indents enabled flag