X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/674ac8b919eecbc201b5f23b470a567cd0565e10..617eb021db47c64790700e4b3a0e02c90761cda8:/src/common/wincmn.cpp diff --git a/src/common/wincmn.cpp b/src/common/wincmn.cpp index 60ed7b7025..f097009630 100644 --- a/src/common/wincmn.cpp +++ b/src/common/wincmn.cpp @@ -118,7 +118,9 @@ void wxWindowBase::InitBase() wxSystemSettings settings; m_backgroundColour = settings.GetSystemColour(wxSYS_COLOUR_BTNFACE); - m_foregroundColour = *wxBLACK; // TODO take this from sys settings too? + // m_foregroundColour = *wxBLACK; // TODO take this from sys settings too? + m_foregroundColour = wxSystemSettings::GetSystemColour(wxSYS_COLOUR_WINDOWTEXT); + #if !defined(__WXMAC__) && !defined(__WXGTK__) m_font = *wxSWISS_FONT; // and this? #else @@ -1217,14 +1219,14 @@ void wxWindowBase::UpdateWindowUI() } #endif // wxUSE_CHECKBOX -#if wxUSE_RADIOBUTTON +#if wxUSE_RADIOBTN wxRadioButton *radiobtn = wxDynamicCast(this, wxRadioButton); if ( radiobtn ) { if ( event.GetSetChecked() ) radiobtn->SetValue(event.GetChecked()); } -#endif // wxUSE_RADIOBUTTON +#endif // wxUSE_RADIOBTN } } @@ -1276,7 +1278,9 @@ void wxWindowBase::DoSetClientObject( wxClientData *data ) wxClientData *wxWindowBase::DoGetClientObject() const { - wxASSERT_MSG( m_clientDataType == ClientData_Object, + // it's not an error to call GetClientObject() on a window which doesn't + // have client data at all - NULL will be returned + wxASSERT_MSG( m_clientDataType != ClientData_Void, wxT("this window doesn't have object client data") ); return m_clientObject; @@ -1293,7 +1297,9 @@ void wxWindowBase::DoSetClientData( void *data ) void *wxWindowBase::DoGetClientData() const { - wxASSERT_MSG( m_clientDataType == ClientData_Void, + // it's not an error to call GetClientData() on a window which doesn't have + // client data at all - NULL will be returned + wxASSERT_MSG( m_clientDataType != ClientData_Object, wxT("this window doesn't have void client data") ); return m_clientData;