Skip to content

Commit

Permalink
put console attributes in own variable
Browse files Browse the repository at this point in the history
  • Loading branch information
LokiMidgard committed Apr 2, 2019
1 parent a247624 commit 2661fbe
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 3 deletions.
3 changes: 2 additions & 1 deletion tools/ColorTool/ColorTool/IniSchemeParser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,8 @@ public ColorScheme ParseScheme(string schemeName, bool reportErrors = false)

if (colorTable != null)
{
return new ColorScheme { colorTable = colorTable, consoleAttributes = new ConsoleAttributes { background = backgroundColor, foreground = foregroundColor, popupBackground = popupBackgroundColor, popupForeground = popupForegroundColor } };
var consoleAttributes = new ConsoleAttributes { background = backgroundColor, foreground = foregroundColor, popupBackground = popupBackgroundColor, popupForeground = popupForegroundColor };
return new ColorScheme { colorTable = colorTable, consoleAttributes = consoleAttributes };
}
else
{
Expand Down
3 changes: 2 additions & 1 deletion tools/ColorTool/ColorTool/JsonParser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,8 @@ public ColorScheme ParseScheme(string schemeName, bool reportErrors = false)
}
}

return new ColorScheme { colorTable = colorTable, consoleAttributes = new ConsoleAttributes { background = screenBackground, foreground = screenForeground, popupBackground = popupBackground, popupForeground = popupForeground } };
var consoleAttributes = new ConsoleAttributes { background = screenBackground, foreground = screenForeground, popupBackground = popupBackground, popupForeground = popupForeground };
return new ColorScheme { colorTable = colorTable, consoleAttributes = consoleAttributes };
}
catch (Exception /*e*/)
{
Expand Down
3 changes: 2 additions & 1 deletion tools/ColorTool/ColorTool/XmlSchemeParser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,8 @@ public ColorScheme ParseScheme(string schemeName, bool reportErrors = false)
return null;
}

return new ColorScheme { colorTable = colorTable, consoleAttributes = new ConsoleAttributes { foreground = fgColor, background = bgColor } };
var consoleAttributes = new ConsoleAttributes { foreground = fgColor, background = bgColor };
return new ColorScheme { colorTable = colorTable, consoleAttributes = consoleAttributes };
}
}
}

0 comments on commit 2661fbe

Please sign in to comment.