From 08056b1a7ed939c2b8c19f357bd99118778250f7 Mon Sep 17 00:00:00 2001 From: Robin Dunn Date: Thu, 6 Feb 2003 02:18:51 +0000 Subject: [PATCH] Check the image height when calulating the line height. This allows larger than normal images to be used. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_2_4_BRANCH@19129 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/generic/listctrl.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/generic/listctrl.cpp b/src/generic/listctrl.cpp index 51f600fa5b..76c1a290e8 100644 --- a/src/generic/listctrl.cpp +++ b/src/generic/listctrl.cpp @@ -2527,8 +2527,16 @@ wxCoord wxListMainWindow::GetLineHeight() const if ( y < SCROLL_UNIT_Y ) y = SCROLL_UNIT_Y; - y += EXTRA_HEIGHT; + if ( m_small_image_list && m_small_image_list->GetImageCount() ) + { + int iw = 0; + int ih = 0; + m_small_image_list->GetSize(0, iw, ih); + y = wxMax(y, ih); + } + + y += EXTRA_HEIGHT; self->m_lineHeight = y + LINE_SPACING; } @@ -3633,6 +3641,7 @@ void wxListMainWindow::SetImageList( wxImageListType *imageList, int which ) { m_small_image_list = imageList; m_small_spacing = width + 14; + m_lineHeight = 0; // ensure that the line height will be recalc'd } }