Generic list and tree ctrl should not use the focused selection color when the top level window is not active.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44108 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Kevin Ollivier
2007-01-07 01:15:20 +00:00
parent 3d7a1b394b
commit ed9a7a63b8
3 changed files with 36 additions and 5 deletions

View File

@@ -2232,7 +2232,11 @@ void wxGenericTreeCtrl::PaintItem(wxGenericTreeItem *item, wxDC& dc)
else
{
int flags = wxCONTROL_SELECTED;
if (m_hasFocus)
if (m_hasFocus
#ifdef __WXMAC__
&& IsControlActive( (ControlRef)GetHandle() )
#endif
)
flags |= wxCONTROL_FOCUSED;
if ((item == m_current) && (m_hasFocus))
flags |= wxCONTROL_CURRENT;
@@ -2374,7 +2378,7 @@ void wxGenericTreeCtrl::PaintLevel( wxGenericTreeItem *item, wxDC &dc, int level
// rectangle, so we want to make sure that the text is visible
// against the normal background, not the highlightbackground, so
// don't use the highlight text colour unless we have the focus.
&& m_hasFocus
&& m_hasFocus && IsControlActive( (ControlRef)GetHandle() )
#endif
)
{