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/trunk@19129 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robin Dunn
2003-02-06 02:18:51 +00:00
parent e2b87f38d9
commit ca7353de3a

View File

@@ -2580,8 +2580,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;
}
@@ -3686,6 +3694,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
}
}