Skip to content

Commit

Permalink
chg - Finished safeguarding all colors
Browse files Browse the repository at this point in the history
---

Type: chg
Breaking: False
Doc Required: False
Part: 1/1
  • Loading branch information
AptiviCEO committed Feb 23, 2024
1 parent 0621e36 commit 576dca3
Showing 1 changed file with 21 additions and 4 deletions.
25 changes: 21 additions & 4 deletions public/Nitrocid/Kernel/Configuration/Instances/KernelMainConfig.cs
Original file line number Diff line number Diff line change
Expand Up @@ -999,12 +999,29 @@ public string NotificationFailureColor
/// </summary>
public string QuestionColor
{
get => KernelColorTools.GetColor(KernelColorType.Question).PlainSequence;
get
{
try
{
return KernelColorTools.GetColor(KernelColorType.Question).PlainSequence;
}
catch
{
return "11";
}
}
set
{
var color = new Color(value);
KernelColorTools.SetColor(KernelColorType.Question, color);
SelectionStyleSettings.GlobalSettings.QuestionColor = color;
try
{
var color = new Color(value);
KernelColorTools.SetColor(KernelColorType.Question, color);
SelectionStyleSettings.GlobalSettings.QuestionColor = color;
}
catch (Exception ex)
{
DebugWriter.WriteDebug(DebugLevel.E, $"Failed to set {nameof(KernelColorType.Question)} [{value}]: {ex.Message}");
}
}
}
/// <summary>
Expand Down

0 comments on commit 576dca3

Please sign in to comment.