Skip to content

Commit

Permalink
QuickViewOptions: remove use of IsKnownColor
Browse files Browse the repository at this point in the history
This was breaking the OSX/IOS/Android builds
  • Loading branch information
robertlong13 committed Dec 4, 2023
1 parent 62ed550 commit a90e93b
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions Controls/QuickViewOptions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -132,12 +132,18 @@ private void TXT_color_TextChanged(object sender, EventArgs e)
{
BUT_colorpicker.BackColor = System.Drawing.ColorTranslator.FromHtml("#"+TXT_color.Text);
Utilities.Settings.Instance[_qv.Name + "_color"] = "#"+TXT_color.Text;
return;
}
if (System.Drawing.Color.FromName(TXT_color.Text).IsKnownColor)
try
{
BUT_colorpicker.BackColor = System.Drawing.ColorTranslator.FromHtml(TXT_color.Text);
Utilities.Settings.Instance[_qv.Name + "_color"] = TXT_color.Text;
}
catch(Exception)
{
// Not a valid color string
return;
}
Utilities.Settings.Instance[_qv.Name + "_color"] = TXT_color.Text;
}

private void BUT_colorpicker_Click(object sender, EventArgs e)
Expand Down

0 comments on commit a90e93b

Please sign in to comment.