mirror of https://github.com/buggins/dlangide.git
console mode support fixes
This commit is contained in:
parent
5b7de27d92
commit
8a4e8a2b76
2
dub.json
2
dub.json
|
@ -12,7 +12,7 @@
|
|||
"stringImportPaths": ["views", "views/res", "views/res/i18n", "views/res/mdpi", "views/res/hdpi"],
|
||||
|
||||
"dependencies": {
|
||||
"dlangui": "==0.9.3",
|
||||
"dlangui": "==0.9.4",
|
||||
"dcd": "~>0.8.0"
|
||||
},
|
||||
|
||||
|
|
|
@ -68,7 +68,10 @@ class DSourceEdit : SourceEdit, EditableContentMarksChangeListener {
|
|||
static if (BACKEND_GUI) backgroundColor = style.customColor("edit_background");
|
||||
setTokenHightlightColor(TokenCategory.Comment, style.customColor("syntax_highlight_comment")); // green
|
||||
setTokenHightlightColor(TokenCategory.Keyword, style.customColor("syntax_highlight_keyword")); // blue
|
||||
setTokenHightlightColor(TokenCategory.Integer, style.customColor("syntax_highlight_integer", 0x000000));
|
||||
setTokenHightlightColor(TokenCategory.Float, style.customColor("syntax_highlight_float", 0x000000));
|
||||
setTokenHightlightColor(TokenCategory.String, style.customColor("syntax_highlight_string")); // brown
|
||||
setTokenHightlightColor(TokenCategory.Identifier, style.customColor("syntax_highlight_ident"));
|
||||
setTokenHightlightColor(TokenCategory.Character, style.customColor("syntax_highlight_character")); // brown
|
||||
setTokenHightlightColor(TokenCategory.Error, style.customColor("syntax_highlight_error")); // red
|
||||
setTokenHightlightColor(TokenCategory.Comment_Documentation, style.customColor("syntax_highlight_comment_documentation"));
|
||||
|
@ -145,7 +148,7 @@ class DSourceEdit : SourceEdit, EditableContentMarksChangeListener {
|
|||
return menu;
|
||||
}
|
||||
|
||||
uint _executionLineHighlightColor = 0x808080FF;
|
||||
uint _executionLineHighlightColor = BACKEND_GUI ? 0x808080FF : 0x000080;
|
||||
int _executionLine = -1;
|
||||
@property int executionLine() { return _executionLine; }
|
||||
@property void executionLine(int line) {
|
||||
|
|
|
@ -266,7 +266,7 @@ class IDEFrame : AppFrame, ProgramExecutionStatusListener, BreakpointListChangeL
|
|||
string tty = _logPanel.terminalDeviceName;
|
||||
if (project.runInExternalConsole) {
|
||||
version(Windows) {
|
||||
if (program.isMagoDebugger)
|
||||
if (program.isMagoDebugger && BACKEND_GUI)
|
||||
tty = "external-console";
|
||||
} else {
|
||||
externalConsoleExecutable = _settings.terminalExecutable;
|
||||
|
|
|
@ -11,12 +11,16 @@ import std.regex;
|
|||
import std.algorithm : startsWith;
|
||||
import std.string;
|
||||
|
||||
static if (BACKEND_CONSOLE) {
|
||||
enum ENABLE_INTERNAL_TERMINAL = true;
|
||||
} else {
|
||||
version (Windows) {
|
||||
enum ENABLE_INTERNAL_TERMINAL = false;
|
||||
} else {
|
||||
enum ENABLE_INTERNAL_TERMINAL = true;
|
||||
}
|
||||
|
||||
}
|
||||
enum ENABLE_INTERNAL_TERMINAL_TEST = false;
|
||||
|
||||
/// event listener to navigate by error/warning position
|
||||
interface CompilerLogIssueClickHandler {
|
||||
|
@ -229,6 +233,9 @@ class OutputPanel : DockWindow {
|
|||
_terminalWidget.layoutWidth(FILL_PARENT).layoutHeight(FILL_PARENT);
|
||||
_tabs.addTab(_terminalWidget, "Output"d);
|
||||
_terminalWidget.write("Hello\nSecond line\nTest\n"d);
|
||||
}
|
||||
static if (ENABLE_INTERNAL_TERMINAL_TEST) {
|
||||
_terminalWidget.write("Hello\nSecond line\nTest\n"d);
|
||||
_terminalWidget.write("SomeString 123456789\rAwesomeString\n"d); // test \r
|
||||
// testing tabs
|
||||
_terminalWidget.write("id\tname\tdescription\n"d);
|
||||
|
|
|
@ -4,8 +4,8 @@ import dlangui.widgets.widget;
|
|||
import dlangui.widgets.controls;
|
||||
|
||||
struct TerminalAttr {
|
||||
ubyte bgColor = 7;
|
||||
ubyte textColor = 0;
|
||||
ubyte bgColor = 0;
|
||||
ubyte textColor = 7;
|
||||
ubyte flags = 0;
|
||||
}
|
||||
|
||||
|
@ -22,7 +22,7 @@ __gshared static uint[16] TERMINAL_PALETTE = [
|
|||
0x0000FF,
|
||||
0xFF00FF,
|
||||
0x00FFFF,
|
||||
0xFFFFFF, // white
|
||||
0xC0C0C0, // white
|
||||
0x808080,
|
||||
0x800000,
|
||||
0x008000,
|
||||
|
@ -30,7 +30,7 @@ __gshared static uint[16] TERMINAL_PALETTE = [
|
|||
0x000080,
|
||||
0x800080,
|
||||
0x008080,
|
||||
0xC0C0C0,
|
||||
0xFFFFFF,
|
||||
];
|
||||
|
||||
uint attrToColor(ubyte v) {
|
||||
|
|
|
@ -1,20 +1,7 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<theme id="ide_theme_dark" parent="theme_default"
|
||||
<theme id="ide_theme_dark" parent="ide_theme_default"
|
||||
fontFace="Verdana,Arial,DejaVu Sans"
|
||||
fontFamily="SansSerif"
|
||||
textColor="#E0E0E0"
|
||||
>
|
||||
<color id="edit_background" value="#070808"/>
|
||||
<color id="link_color" value="#2020FF"/>
|
||||
<color id="syntax_highlight_comment" value="#808000"/>
|
||||
<color id="syntax_highlight_keyword" value="#00FF00"/>
|
||||
<color id="syntax_highlight_string" value="#FF00FF"/>
|
||||
<color id="syntax_highlight_character" value="#FFFF00"/>
|
||||
<color id="syntax_highlight_error" value="#FF0000"/>
|
||||
<color id="syntax_highlight_comment_documentation" value="#FFFF00"/>
|
||||
|
||||
<color id="build_log_filename_color" value="#0000FF"/>
|
||||
<color id="build_log_error_color" value="#FF0000"/>
|
||||
<color id="build_log_warning_color" value="#FFFF00"/>
|
||||
<color id="build_log_deprecation_color" value="#FF00FF"/>
|
||||
</theme>
|
||||
|
|
|
@ -6,11 +6,14 @@
|
|||
<color id="edit_background" value="#000080"/>
|
||||
<color id="link_color" value="#2020FF"/>
|
||||
<color id="syntax_highlight_comment" value="#808000"/>
|
||||
<color id="syntax_highlight_keyword" value="#00FF00"/>
|
||||
<color id="syntax_highlight_string" value="#FF00FF"/>
|
||||
<color id="syntax_highlight_keyword" value="#00FFFF"/>
|
||||
<color id="syntax_highlight_string" value="#FFFF00"/>
|
||||
<color id="syntax_highlight_character" value="#FFFF00"/>
|
||||
<color id="syntax_highlight_error" value="#FF0000"/>
|
||||
<color id="syntax_highlight_integer" value="#FFFFFF"/>
|
||||
<color id="syntax_highlight_float" value="#FFFFFF"/>
|
||||
<color id="syntax_highlight_comment_documentation" value="#FFFF00"/>
|
||||
<color id="syntax_highlight_ident" value="#008000"/>
|
||||
|
||||
<color id="build_log_filename_color" value="#0000C0"/>
|
||||
<color id="build_log_error_color" value="#FF0000"/>
|
||||
|
|
|
@ -12,6 +12,9 @@
|
|||
<color id="syntax_highlight_character" value="#C37525"/>
|
||||
<color id="syntax_highlight_error" value="#FF0000"/>
|
||||
<color id="syntax_highlight_comment_documentation" value="#50a000"/>
|
||||
<color id="syntax_highlight_integer" value="#FFFFFF"/>
|
||||
<color id="syntax_highlight_float" value="#FFFFFF"/>
|
||||
<color id="syntax_highlight_ident" value="#C0C0C0"/>
|
||||
|
||||
<color id="build_log_filename_color" value="#3030FF"/>
|
||||
<color id="build_log_error_color" value="#FF4040"/>
|
||||
|
|
|
@ -11,6 +11,9 @@
|
|||
<color id="syntax_highlight_character" value="#a31515"/>
|
||||
<color id="syntax_highlight_error" value="#FF0000"/>
|
||||
<color id="syntax_highlight_comment_documentation" value="#206000"/>
|
||||
<color id="syntax_highlight_integer" value="#000000"/>
|
||||
<color id="syntax_highlight_float" value="#000000"/>
|
||||
<color id="syntax_highlight_ident" value="#000000"/>
|
||||
|
||||
<color id="build_log_filename_color" value="#0000C0"/>
|
||||
<color id="build_log_error_color" value="#FF0000"/>
|
||||
|
|
Loading…
Reference in New Issue