]> git.saurik.com Git - wxWidgets.git/commitdiff
Improve default wxDVC line height on Windows >= Vista.
authorVáclav Slavík <vslavik@fastmail.fm>
Mon, 27 Feb 2012 14:27:47 +0000 (14:27 +0000)
committerVáclav Slavík <vslavik@fastmail.fm>
Mon, 27 Feb 2012 14:27:47 +0000 (14:27 +0000)
Explorer in Vista/Win7 uses slightly larger rows, so mimic it.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70706 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/generic/datavgen.cpp

index e9658b5244cbc1338d9afbbcc2fe2fe771e2a929..6806d4e1de31a47cc43730a309519052e0b0d995 100644 (file)
@@ -1377,7 +1377,14 @@ wxDataViewMainWindow::wxDataViewMainWindow( wxDataViewCtrl *parent, wxWindowID i
     m_useCellFocus = false;
     m_currentRow = 0;
 
-    m_lineHeight = wxMax( 17, GetCharHeight() + 4 ); // 17 = mini icon height + 1
+#ifdef __WXMSW__
+    // We would like to use the same line height that Explorer uses. This is
+    // different from standard ListView control since Vista.
+    if ( wxGetWinVersion() >= wxWinVersion_Vista )
+        m_lineHeight = wxMax(16, GetCharHeight()) + 6; // 16 = mini icon height
+    else
+#endif // __WXMSW__
+        m_lineHeight = wxMax(16, GetCharHeight()) + 1; // 16 = mini icon height
 
 #if wxUSE_DRAG_AND_DROP
     m_dragCount = 0;