Made wxWindow::Enable recursive in order to solve colouring problems; forced the colour
of a wxTextCtrl back to the custom colour in wxTextCtrl::Enable. This appears to fix inconsistent colour problems. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@10179 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -756,6 +756,20 @@ bool wxTextCtrl::Enable( bool enable )
|
||||
if (m_windowStyle & wxTE_MULTILINE)
|
||||
{
|
||||
gtk_text_set_editable( GTK_TEXT(m_text), enable );
|
||||
|
||||
// If we have a custom background colour, we use this colour in both
|
||||
// disabled and enabled mode, or we end up with a different colour under the
|
||||
// text.
|
||||
wxColour oldColour = GetBackgroundColour();
|
||||
if (oldColour.Ok())
|
||||
{
|
||||
// Need to set twice or it'll optimize the useful stuff out
|
||||
if (oldColour == * wxWHITE)
|
||||
SetBackgroundColour(*wxBLACK);
|
||||
else
|
||||
SetBackgroundColour(*wxWHITE);
|
||||
SetBackgroundColour(oldColour);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
Reference in New Issue
Block a user