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:
@@ -20,8 +20,10 @@ using namespace Windows::UI::Xaml::Automation;
|
||||
using namespace Windows::UI::Xaml::Controls;
|
||||
using namespace Windows::UI::Xaml::Input;
|
||||
using namespace Windows::UI::Xaml::Controls::Primitives;
|
||||
using namespace Windows::UI::Xaml::Media;
|
||||
|
||||
DEPENDENCY_PROPERTY_INITIALIZATION(EquationTextBox, EquationColor);
|
||||
DEPENDENCY_PROPERTY_INITIALIZATION(EquationTextBox, EquationButtonForegroundColor);
|
||||
DEPENDENCY_PROPERTY_INITIALIZATION(EquationTextBox, ColorChooserFlyout);
|
||||
DEPENDENCY_PROPERTY_INITIALIZATION(EquationTextBox, EquationButtonContentIndex);
|
||||
DEPENDENCY_PROPERTY_INITIALIZATION(EquationTextBox, HasError);
|
||||
|
@@ -20,6 +20,7 @@ namespace CalculatorApp
|
||||
|
||||
DEPENDENCY_PROPERTY_OWNER(EquationTextBox);
|
||||
DEPENDENCY_PROPERTY(Windows::UI::Xaml::Media::SolidColorBrush ^, EquationColor);
|
||||
DEPENDENCY_PROPERTY(Windows::UI::Xaml::Media::SolidColorBrush ^, EquationButtonForegroundColor);
|
||||
DEPENDENCY_PROPERTY(Windows::UI::Xaml::Controls::Flyout ^, ColorChooserFlyout);
|
||||
DEPENDENCY_PROPERTY(Platform::String ^, EquationButtonContentIndex);
|
||||
DEPENDENCY_PROPERTY(Platform::String ^, MathEquation);
|
||||
|
Reference in New Issue
Block a user