From: Jean-Philippe Bruyère Date: Sun, 11 Mar 2018 01:16:32 +0000 (+0100) Subject: code color X-Git-Tag: 0.7.3~4^2~13 X-Git-Url: https://git.osiis.dedyn.io/?a=commitdiff_plain;h=ce0ae6979394ea2274c9467bf84f5e5cf0177f11;p=jp%2Fcrow.git code color --- diff --git a/CrowIDE/src/Editors/CodeBuffer/SourceEditor.cs b/CrowIDE/src/Editors/CodeBuffer/SourceEditor.cs index e605dd55..72e916eb 100644 --- a/CrowIDE/src/Editors/CodeBuffer/SourceEditor.cs +++ b/CrowIDE/src/Editors/CodeBuffer/SourceEditor.cs @@ -47,7 +47,7 @@ namespace Crow.Coding #region CTOR public SourceEditor (): base() { - formatting.Add ((int)XMLParser.TokenType.AttributeName, new TextFormatting (Color.Teal, Color.Transparent)); + formatting.Add ((int)XMLParser.TokenType.AttributeName, new TextFormatting (Color.DarkJungleGreen, Color.Transparent)); formatting.Add ((int)XMLParser.TokenType.ElementName, new TextFormatting (Color.DarkBlue, Color.Transparent)); formatting.Add ((int)XMLParser.TokenType.ElementStart, new TextFormatting (Color.Black, Color.Transparent)); formatting.Add ((int)XMLParser.TokenType.ElementEnd, new TextFormatting (Color.Black, Color.Transparent)); @@ -61,6 +61,7 @@ namespace Crow.Coding formatting.Add ((int)BufferParser.TokenType.BlockComment, new TextFormatting (Color.Gray, Color.Transparent, false, true)); formatting.Add ((int)BufferParser.TokenType.LineComment, new TextFormatting (Color.Gray, Color.Transparent, false, true)); formatting.Add ((int)BufferParser.TokenType.OperatorOrPunctuation, new TextFormatting (Color.Black, Color.Transparent)); + formatting.Add ((int)BufferParser.TokenType.Keyword, new TextFormatting (Color.Teal, Color.Transparent)); //formatting.Add ((int)BufferParser.TokenType.Keyword, new TextFormatting (Color.DarkCyan, Color.Transparent)); parsing.Add (".crow", "Crow.Coding.XMLParser"); @@ -86,7 +87,7 @@ namespace Crow.Coding int requestedLine = 0, requestedCol = 0; volatile bool isDirty = false; - const int leftMarginGap = 3;//gap between items in margin and text + const int leftMarginGap = 10;//gap between items in margin and text const int foldSize = 9;//folding rectangles size const int foldHSpace = 4;//folding level tabulation x int foldMargin { get { return parser == null ? 0 : parser.SyntacticTreeMaxDepth * foldHSpace; }}//folding margin size diff --git a/CrowIDE/src/Editors/Parsers/XMLParser.cs b/CrowIDE/src/Editors/Parsers/XMLParser.cs index d31e1023..b1c50f2a 100644 --- a/CrowIDE/src/Editors/Parsers/XMLParser.cs +++ b/CrowIDE/src/Editors/Parsers/XMLParser.cs @@ -17,8 +17,8 @@ namespace Crow.Coding BlockCommentStart = BufferParser.TokenType.BlockCommentStart, BlockComment = BufferParser.TokenType.BlockComment, BlockCommentEnd = BufferParser.TokenType.BlockCommentEnd, - ElementName = BufferParser.TokenType.Identifier, - AttributeName = BufferParser.TokenType.Keyword, + ElementName = BufferParser.TokenType.Type, + AttributeName = BufferParser.TokenType.Identifier, ElementClosing = BufferParser.TokenType.StatementEnding, Affectation = BufferParser.TokenType.OperatorOrPunctuation, AttributeValueOpening = BufferParser.TokenType.StringLitteralOpening,