From 1c0a0736a301174572c2f3ef65db9c59456ace05 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Tue, 12 Jun 2012 21:41:50 +0000 Subject: [PATCH] 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 --- include/wx/generic/private/listctrl.h | 6 ++---- src/generic/listctrl.cpp | 14 ++++---------- 2 files changed, 6 insertions(+), 14 deletions(-) diff --git a/include/wx/generic/private/listctrl.h b/include/wx/generic/private/listctrl.h index e39de04dbf..3145bd1b7d 100644 --- a/include/wx/generic/private/listctrl.h +++ b/include/wx/generic/private/listctrl.h @@ -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(); diff --git a/src/generic/listctrl.cpp b/src/generic/listctrl.cpp index 11fa7ffcfb..de34935ced 100644 --- a/src/generic/listctrl.cpp +++ b/src/generic/listctrl.cpp @@ -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 ); -- 2.45.2