Skip to content
This repository has been archived by the owner on Mar 28, 2024. It is now read-only.

Commit

Permalink
modify color rgb->argb
Browse files Browse the repository at this point in the history
  • Loading branch information
creazyboyone committed May 14, 2020
1 parent 58b2a9b commit 9c0108e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion DSTEd/Core/Configuration.cs
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ public Color GetColor(string name, Color defaults) {
if (!s.Equals(""))
{
string[] c = s.Split(',');
return Color.FromRgb(byte.Parse(c[0]), byte.Parse(c[1]), byte.Parse(c[2]));
return Color.FromArgb(byte.Parse(c[0]), byte.Parse(c[1]), byte.Parse(c[2]), byte.Parse(c[3]));
} else
{
return defaults;
Expand Down
6 changes: 4 additions & 2 deletions DSTEd/Core/Contents/Editors/Code.cs
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ public Code(Document document) {
this.ShowLineNumbers = config.GetBool("Editor_ShowLineNumbers", true);
this.FontFamily = new FontFamily(config.Get("Editor_FontFamily", "Consolas"));
this.FontSize = config.GetDouble("Editor_FontSize", 14);
this.Background = new SolidColorBrush(config.GetColor("Editor_Background", Color.FromRgb(37, 37, 38)));
this.Foreground = new SolidColorBrush(config.GetColor("Editor_Foreground", Color.FromRgb(248, 248, 242)));
this.Background = new SolidColorBrush(config.GetColor("Editor_Background", Color.FromArgb(255, 34, 34, 35)));
this.Foreground = new SolidColorBrush(config.GetColor("Editor_Foreground", Color.FromArgb(255, 248, 248, 242)));

TextEditorOptions options = new TextEditorOptions();
options.AllowScrollBelowDocument = true;
Expand All @@ -46,6 +46,8 @@ public Code(Document document) {
this.TextArea.TextEntered += OnEntered;
completion = new CompletionWindow(this.TextArea);
OnInit();

this.TextArea.IndentationStrategy = new ICSharpCode.AvalonEdit.Indentation.CSharp.CSharpIndentationStrategy();
new XmlFoldingStrategy().UpdateFoldings(FoldingManager.Install(this.TextArea), this.Document);
}
static Code()//run once,to initialize basic completions
Expand Down

0 comments on commit 9c0108e

Please sign in to comment.