1
0
mirror of https://github.com/fadden/6502bench.git synced 2024-06-11 17:29:29 +00:00

Tweak comment entry UI

End-of-line comments have a couple of guidelines: keep it short, and
don't use non-ASCII characters.  Violating these isn't an error, so
we should be making the text blue rather than red.
This commit is contained in:
Andy McFadden 2021-11-03 20:23:27 -07:00
parent e622afd929
commit 3ea07f3eb7

View File

@ -67,12 +67,12 @@ namespace SourceGen.WpfGui {
private void CommentTextBox_TextChanged(object sender, TextChangedEventArgs e) {
if (!CommonUtil.TextUtil.IsPrintableAscii(commentTextBox.Text)) {
asciiOnlyLabel.Foreground = Brushes.Red;
asciiOnlyLabel.Foreground = Brushes.Blue;
} else {
asciiOnlyLabel.Foreground = mDefaultLabelColor;
}
if (commentTextBox.Text.Length > RECOMMENDED_MAX_LENGTH) {
maxLengthLabel.Foreground = Brushes.Red;
maxLengthLabel.Foreground = Brushes.Blue;
} else {
maxLengthLabel.Foreground = mDefaultLabelColor;
}