Don't use generic wxListCtrl style for wxListMainWindow.

This resulted in double border around wxListCtrl contents in wxOSX and almost
certainly other ports except wxGTK for which we already had an explicit
preprocessor check in the generic list control code. Remove it and simply
don't use any wxListCtrl-specific styles, including borders, for its main
window as it doesn't make any sense.

Closes #3701.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71724 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2012-06-12 21:41:50 +00:00
parent ac6d7c66e0
commit 1c0a0736a3
2 changed files with 6 additions and 14 deletions

View File

@ -450,10 +450,8 @@ public:
wxListMainWindow();
wxListMainWindow( wxWindow *parent,
wxWindowID id,
const wxPoint& pos = wxDefaultPosition,
const wxSize& size = wxDefaultSize,
long style = 0,
const wxString &name = wxT("listctrlmainwindow") );
const wxPoint& pos,
const wxSize& size );
virtual ~wxListMainWindow();

View File

@ -1582,10 +1582,9 @@ wxListMainWindow::wxListMainWindow()
wxListMainWindow::wxListMainWindow( wxWindow *parent,
wxWindowID id,
const wxPoint& pos,
const wxSize& size,
long style,
const wxString &name )
: wxWindow( parent, id, pos, size, style, name )
const wxSize& size )
: wxWindow( parent, id, pos, size,
wxWANTS_CHARS | wxBORDER_NONE )
{
Init();
@ -4389,12 +4388,7 @@ bool wxGenericListCtrl::Create(wxWindow *parent,
validator, name ) )
return false;
#ifdef __WXGTK__
style &= ~wxBORDER_MASK;
style |= wxBORDER_THEME;
#endif
m_mainWin = new wxListMainWindow( this, wxID_ANY, wxPoint(0, 0), size, style );
m_mainWin = new wxListMainWindow(this, wxID_ANY, wxPoint(0, 0), size);
SetTargetWindow( m_mainWin );