]> git.saurik.com Git - wxWidgets.git/commitdiff
Also get header button height right
authorRobert Roebling <robert@roebling.de>
Thu, 27 Dec 2007 18:41:40 +0000 (18:41 +0000)
committerRobert Roebling <robert@roebling.de>
Thu, 27 Dec 2007 18:41:40 +0000 (18:41 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@50926 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/generic/datavgen.cpp

index 7238e3a4f8a3167f8fa77eff6039a194bc6d3547..6fafd57a25454103c318ea1d40069ba0f918d0df 100644 (file)
@@ -1281,14 +1281,16 @@ bool wxDataViewHeaderWindowMSW::Create( wxDataViewCtrl *parent, wxWindowID id,
     m_owner = parent;
 
     m_scrollOffsetX = 0;
-    m_buttonHeight = wxRendererNative::Get().GetHeaderButtonHeight( this ) + 10;
+    m_buttonHeight = wxRendererNative::Get().GetHeaderButtonHeight( this );
 
     int x = pos.x == wxDefaultCoord ? 0 : pos.x,
         y = pos.y == wxDefaultCoord ? 0 : pos.y,
         w = size.x == wxDefaultCoord ? 1 : size.x,
-        h = size.y == wxDefaultCoord ? m_buttonHeight : size.y;
+        h = m_buttonHeight;
 
-    if ( !CreateControl(parent, id, pos, size, 0, wxDefaultValidator, name) )
+    wxSize new_size(w,h);
+
+    if ( !CreateControl(parent, id, pos, new_size, 0, wxDefaultValidator, name) )
         return false;
 
     // create the native WC_HEADER window: