Don't use wxRendererNative::DrawFocusRect() under Mac.
This function doesn't do the right thing there, it draws the focus border as it's drawn around controls such as buttons. This border overflows the item rectangle and results in garbage remaining on screen when selection changes. See #12229. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64966 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -2114,6 +2114,10 @@ void wxListMainWindow::OnPaint( wxPaintEvent &WXUNUSED(event) )
|
||||
}
|
||||
}
|
||||
|
||||
// DrawFocusRect() is unusable under Mac, it draws outside of the highlight
|
||||
// rectangle somehow and so leaves traces when the item is not selected any
|
||||
// more, see #12229.
|
||||
#ifndef __WXMAC__
|
||||
if ( HasCurrent() )
|
||||
{
|
||||
int flags = 0;
|
||||
@@ -2123,6 +2127,7 @@ void wxListMainWindow::OnPaint( wxPaintEvent &WXUNUSED(event) )
|
||||
wxRendererNative::Get().
|
||||
DrawFocusRect(this, dc, GetLineHighlightRect(m_current), flags);
|
||||
}
|
||||
#endif // !__WXMAC__
|
||||
}
|
||||
|
||||
void wxListMainWindow::HighlightAll( bool on )
|
||||
|
Reference in New Issue
Block a user