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
This commit is contained in:
@@ -1272,11 +1272,11 @@ void wxComboCtrlBase::PrepareBackground( wxDC& dc, const wxRect& rect, int flags
|
|||||||
|
|
||||||
if ( isEnabled )
|
if ( isEnabled )
|
||||||
{
|
{
|
||||||
if ( m_hasFgCol )
|
if ( isFocused )
|
||||||
|
fgCol = wxSystemSettings::GetColour(wxSYS_COLOUR_HIGHLIGHTTEXT);
|
||||||
|
else if ( m_hasFgCol )
|
||||||
// Honour the custom foreground colour
|
// Honour the custom foreground colour
|
||||||
fgCol = GetForegroundColour();
|
fgCol = GetForegroundColour();
|
||||||
else if ( isFocused )
|
|
||||||
fgCol = wxSystemSettings::GetColour(wxSYS_COLOUR_HIGHLIGHTTEXT) );
|
|
||||||
else
|
else
|
||||||
fgCol = wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT);
|
fgCol = wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT);
|
||||||
}
|
}
|
||||||
@@ -1287,11 +1287,11 @@ void wxComboCtrlBase::PrepareBackground( wxDC& dc, const wxRect& rect, int flags
|
|||||||
|
|
||||||
if ( isEnabled )
|
if ( isEnabled )
|
||||||
{
|
{
|
||||||
if ( m_hasBgCol )
|
if ( isFocused )
|
||||||
|
bgCol = wxSystemSettings::GetColour(wxSYS_COLOUR_HIGHLIGHT);
|
||||||
|
else if ( m_hasBgCol )
|
||||||
// Honour the custom background colour
|
// Honour the custom background colour
|
||||||
bgCol = GetBackgroundColour();
|
bgCol = GetBackgroundColour();
|
||||||
else if ( isFocused )
|
|
||||||
bgCol = wxSystemSettings::GetColour(wxSYS_COLOUR_HIGHLIGHT);
|
|
||||||
else
|
else
|
||||||
#ifndef __WXMAC__ // see note in OnThemeChange
|
#ifndef __WXMAC__ // see note in OnThemeChange
|
||||||
bgCol = GetBackgroundColour();
|
bgCol = GetBackgroundColour();
|
||||||
|
@@ -366,11 +366,11 @@ wxComboCtrl::PrepareBackground( wxDC& dc, const wxRect& rect, int flags ) const
|
|||||||
|
|
||||||
if ( isEnabled )
|
if ( isEnabled )
|
||||||
{
|
{
|
||||||
if ( m_hasFgCol )
|
if ( isFocused )
|
||||||
|
fgCol = wxSystemSettings::GetColour(wxSYS_COLOUR_HIGHLIGHTTEXT);
|
||||||
|
else if ( m_hasFgCol )
|
||||||
// Honour the custom foreground colour
|
// Honour the custom foreground colour
|
||||||
fgCol = GetForegroundColour();
|
fgCol = GetForegroundColour();
|
||||||
else if ( isFocused )
|
|
||||||
fgCol = wxSystemSettings::GetColour(wxSYS_COLOUR_HIGHLIGHTTEXT);
|
|
||||||
else
|
else
|
||||||
fgCol = wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT);
|
fgCol = wxSystemSettings::GetColour(wxSYS_COLOUR_WINDOWTEXT);
|
||||||
}
|
}
|
||||||
@@ -381,11 +381,11 @@ wxComboCtrl::PrepareBackground( wxDC& dc, const wxRect& rect, int flags ) const
|
|||||||
|
|
||||||
if ( isEnabled )
|
if ( isEnabled )
|
||||||
{
|
{
|
||||||
if ( m_hasBgCol )
|
if ( isFocused )
|
||||||
|
bgCol = wxSystemSettings::GetColour(wxSYS_COLOUR_HIGHLIGHT);
|
||||||
|
else if ( m_hasBgCol )
|
||||||
// Honour the custom background colour
|
// Honour the custom background colour
|
||||||
bgCol = GetBackgroundColour();
|
bgCol = GetBackgroundColour();
|
||||||
else if ( isFocused )
|
|
||||||
bgCol = wxSystemSettings::GetColour(wxSYS_COLOUR_HIGHLIGHT);
|
|
||||||
else
|
else
|
||||||
bgCol = GetBackgroundColour();
|
bgCol = GetBackgroundColour();
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user