diff options
Diffstat (limited to 'win/CS/HandBrakeWPF/Controls')
-rw-r--r-- | win/CS/HandBrakeWPF/Controls/NumberBox.xaml.cs | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/win/CS/HandBrakeWPF/Controls/NumberBox.xaml.cs b/win/CS/HandBrakeWPF/Controls/NumberBox.xaml.cs index 7a8fc7519..3b86ee783 100644 --- a/win/CS/HandBrakeWPF/Controls/NumberBox.xaml.cs +++ b/win/CS/HandBrakeWPF/Controls/NumberBox.xaml.cs @@ -413,7 +413,7 @@ namespace HandBrakeWPF.Controls this.numberBox.Text = string.Empty;
}
- this.numberBox.Foreground = new SolidColorBrush(Colors.Black);
+ this.numberBox.ClearValue(TextBox.ForegroundProperty);
}
}
@@ -557,14 +557,10 @@ namespace HandBrakeWPF.Controls if (this.AllowEmpty && this.Number == 0)
{
this.numberBox.Text = this.hasFocus ? string.Empty : this.NoneCaption;
-
- // this.numberBox.Foreground = new SolidColorBrush(Colors.Gray);
}
else
{
this.numberBox.Text = this.Number.ToString(CultureInfo.InvariantCulture);
-
- // this.numberBox.Foreground = new SolidColorBrush(Colors.Black);
}
this.RefreshNumberBoxColor();
@@ -575,7 +571,14 @@ namespace HandBrakeWPF.Controls /// </summary>
private void RefreshNumberBoxColor()
{
- this.numberBox.Foreground = this.numberBox.Text == this.NoneCaption ? new SolidColorBrush(Colors.Gray) : new SolidColorBrush(Colors.Black);
+ if (this.numberBox.Text == this.NoneCaption)
+ {
+ this.numberBox.Foreground = new SolidColorBrush(Colors.Gray);
+ }
+ else
+ {
+ this.numberBox.ClearValue(TextBox.ForegroundProperty);
+ }
}
/// <summary>
|