From c012190c3f64ce980b3303dfb87c58c25d16ce50 Mon Sep 17 00:00:00 2001 From: Jaakko Salli Date: Fri, 18 Dec 2009 17:03:06 +0000 Subject: [PATCH] In wxComboCtrl, prefer focus rectangle colours over custom ones. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_8_BRANCH@62929 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/combocmn.cpp | 12 ++++++------ src/msw/combo.cpp | 12 ++++++------ 2 files changed, 12 insertions(+), 12 deletions(-) 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(); }