diff --git a/src/common/combocmn.cpp b/src/common/combocmn.cpp index 6597dcea7a..37f95e0466 100644 --- a/src/common/combocmn.cpp +++ b/src/common/combocmn.cpp @@ -1272,11 +1272,11 @@ void wxComboCtrlBase::PrepareBackground( wxDC& dc, const wxRect& rect, int flags if ( isEnabled ) { - if ( m_hasFgCol ) + if ( isFocused ) + fgCol = wxSystemSettings::GetColour(wxSYS_COLOUR_HIGHLIGHTTEXT); + else if ( m_hasFgCol ) // Honour the custom foreground colour fgCol = GetForegroundColour(); - else if ( isFocused ) - fgCol = wxSystemSettings::GetColour(wxSYS_COLOUR_HIGHLIGHTTEXT) ); else fgCol = wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT); } @@ -1287,11 +1287,11 @@ void wxComboCtrlBase::PrepareBackground( wxDC& dc, const wxRect& rect, int flags if ( isEnabled ) { - if ( m_hasBgCol ) + if ( isFocused ) + bgCol = wxSystemSettings::GetColour(wxSYS_COLOUR_HIGHLIGHT); + else if ( m_hasBgCol ) // Honour the custom background colour bgCol = GetBackgroundColour(); - else if ( isFocused ) - bgCol = wxSystemSettings::GetColour(wxSYS_COLOUR_HIGHLIGHT); else #ifndef __WXMAC__ // see note in OnThemeChange bgCol = GetBackgroundColour(); diff --git a/src/msw/combo.cpp b/src/msw/combo.cpp index 56955031ab..34609a14e4 100644 --- a/src/msw/combo.cpp +++ b/src/msw/combo.cpp @@ -366,11 +366,11 @@ wxComboCtrl::PrepareBackground( wxDC& dc, const wxRect& rect, int flags ) const if ( isEnabled ) { - if ( m_hasFgCol ) + if ( isFocused ) + fgCol = wxSystemSettings::GetColour(wxSYS_COLOUR_HIGHLIGHTTEXT); + else if ( m_hasFgCol ) // Honour the custom foreground colour fgCol = GetForegroundColour(); - else if ( isFocused ) - fgCol = wxSystemSettings::GetColour(wxSYS_COLOUR_HIGHLIGHTTEXT); else fgCol = wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT); } @@ -381,11 +381,11 @@ wxComboCtrl::PrepareBackground( wxDC& dc, const wxRect& rect, int flags ) const if ( isEnabled ) { - if ( m_hasBgCol ) + if ( isFocused ) + bgCol = wxSystemSettings::GetColour(wxSYS_COLOUR_HIGHLIGHT); + else if ( m_hasBgCol ) // Honour the custom background colour bgCol = GetBackgroundColour(); - else if ( isFocused ) - bgCol = wxSystemSettings::GetColour(wxSYS_COLOUR_HIGHLIGHT); else bgCol = GetBackgroundColour(); }