Avoid permanently setting text hint color when using generic text entry hints
Multiple calls to SetHint() would cause the original color to be lost See #17118
This commit is contained in:
@@ -102,8 +102,11 @@ private:
|
|||||||
|
|
||||||
// Save the old text colour and set a more inconspicuous one for the
|
// Save the old text colour and set a more inconspicuous one for the
|
||||||
// hint.
|
// hint.
|
||||||
|
if (!m_colFg.IsOk())
|
||||||
|
{
|
||||||
m_colFg = m_win->GetForegroundColour();
|
m_colFg = m_win->GetForegroundColour();
|
||||||
m_win->SetForegroundColour(*wxLIGHT_GREY);
|
m_win->SetForegroundColour(*wxLIGHT_GREY);
|
||||||
|
}
|
||||||
|
|
||||||
m_entry->DoSetValue(m_hint, wxTextEntryBase::SetValue_NoEvent);
|
m_entry->DoSetValue(m_hint, wxTextEntryBase::SetValue_NoEvent);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user