Updated EquationButton contrast fixed dark mode foreground color bugs (#1155)

* Fixed contrast between background and foreground colors in the equation button. Fixed the issue where the text in the equation text box is white when the background is white

* Adjust the foreground color algorithm

* moved the contrast method to utils so that it is resuable

* Moved brushes for the GetContrastColor method to the app.xaml resource dictionary

* Removed the change for the edit box colors, so it can be in a different PR
This commit is contained in:
Stephanie Anderl
2020-05-05 10:20:05 -07:00
committed by GitHub
parent 9817738307
commit 3055a12178
8 changed files with 39 additions and 6 deletions

View File

@@ -293,6 +293,10 @@
<x:Double x:Key="CalcOperatorCaptionSize">14</x:Double>
<x:Double x:Key="CalcOperatorTextIconCaptionSize">16</x:Double>
<!-- White and black color brushes used for the Utils::GetContrastColor-->
<SolidColorBrush x:Key="WhiteBrush" Color="White"/>
<SolidColorBrush x:Key="BlackBrush" Color="Black"/>
<!-- Base style for calc buttons -->
<Style x:Key="CalcButtonStyle" TargetType="Controls:CalculatorButton">
<Setter Property="MinWidth" Value="24"/>