Fix some UI bugs in graph mode (#862)

* Address issues with error states

* Add various fixes

* Add back initial tooltip

* PR comments
This commit is contained in:
Pepe Rivera
2019-12-12 12:58:28 -08:00
committed by GitHub
parent f282605bc6
commit 2a0637e51c
9 changed files with 58 additions and 25 deletions

View File

@@ -315,7 +315,11 @@ void EquationTextBox::UpdateCommonVisualState()
{
String ^ state = nullptr;
if (m_HasFocus)
if (m_HasFocus && HasError)
{
state = "FocusedError";
}
else if (m_HasFocus)
{
state = "Focused";
}
@@ -390,7 +394,12 @@ void EquationTextBox::OnRichEditMenuOpening(Object ^ /*sender*/, Object ^ /*args
{
if (m_kgfEquationMenuItem != nullptr)
{
m_kgfEquationMenuItem->IsEnabled = EquationTextBox::RichEditHasContent();
m_kgfEquationMenuItem->IsEnabled = RichEditHasContent();
}
if (m_colorChooserMenuItem != nullptr)
{
m_colorChooserMenuItem->IsEnabled = !HasError;
}
}