]> git.saurik.com Git - wxWidgets.git/commitdiff
Don't use generic wxListCtrl style for wxListMainWindow.
authorVadim Zeitlin <vadim@wxwidgets.org>
Tue, 12 Jun 2012 21:41:50 +0000 (21:41 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Tue, 12 Jun 2012 21:41:50 +0000 (21:41 +0000)
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
src/generic/listctrl.cpp

index e39de04dbf5e39921f46c55cf65a4fb01d3f651f..3145bd1b7d9b7defe4cf6f6011e9d32f1891e339 100644 (file)
@@ -450,10 +450,8 @@ public:
     wxListMainWindow();
     wxListMainWindow( wxWindow *parent,
                       wxWindowID id,
     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();
 
 
     virtual ~wxListMainWindow();
 
index 11fa7ffcfbc75391a7846fe4fa79fe6b4d17bb01..de34935ced4fdb7b61eb45d95f2e27fdd4557584 100644 (file)
@@ -1582,10 +1582,9 @@ wxListMainWindow::wxListMainWindow()
 wxListMainWindow::wxListMainWindow( wxWindow *parent,
                                     wxWindowID id,
                                     const wxPoint& pos,
 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();
 
 {
     Init();
 
@@ -4389,12 +4388,7 @@ bool wxGenericListCtrl::Create(wxWindow *parent,
                                   validator, name ) )
         return false;
 
                                   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 );
 
 
     SetTargetWindow( m_mainWin );