From eb7df491e1781dea9001c6c5052d36566ba9ba90 Mon Sep 17 00:00:00 2001 From: =?utf8?q?V=C3=A1clav=20Slav=C3=ADk?= Date: Mon, 27 Feb 2012 14:27:47 +0000 Subject: [PATCH] Improve default wxDVC line height on Windows >= Vista. 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 | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/src/generic/datavgen.cpp b/src/generic/datavgen.cpp index e9658b5244..6806d4e1de 100644 --- a/src/generic/datavgen.cpp +++ b/src/generic/datavgen.cpp @@ -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; -- 2.45.2