From: Vadim Zeitlin Date: Tue, 28 May 2002 16:44:33 +0000 (+0000) Subject: fixed icon drawing when they have different sizes (patch 554973) X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/c2569f41b10ee497c7dfeeb5c90f354f8d574274?ds=inline fixed icon drawing when they have different sizes (patch 554973) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15698 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/src/generic/listctrl.cpp b/src/generic/listctrl.cpp index 28853c64c4..38a9a92ce0 100644 --- a/src/generic/listctrl.cpp +++ b/src/generic/listctrl.cpp @@ -1449,8 +1449,8 @@ void wxListLineData::SetPosition( int x, int y, if ( item->HasImage() ) { - m_gi->m_rectIcon.x = m_gi->m_rectAll.x + 4 - + (spacing - m_gi->m_rectIcon.width)/2; + m_gi->m_rectIcon.x = m_gi->m_rectAll.x + 4 + + (m_gi->m_rectAll.width - m_gi->m_rectIcon.width) / 2; m_gi->m_rectIcon.y = m_gi->m_rectAll.y + 4; }