diff --git a/include/wx/generic/private/listctrl.h b/include/wx/generic/private/listctrl.h index e0da92797f..63c97e24d9 100644 --- a/include/wx/generic/private/listctrl.h +++ b/include/wx/generic/private/listctrl.h @@ -190,9 +190,9 @@ public: wxT("width can only be increased") ); m_rectAll.width = w; - m_rectLabel.x = m_rectAll.x + (w - m_rectLabel.width) / 2; - m_rectIcon.x = m_rectAll.x + (w - m_rectIcon.width) / 2; - m_rectHighlight.x = m_rectAll.x + (w - m_rectHighlight.width) / 2; + m_rectLabel.x += (w - m_rectLabel.width) / 2; + m_rectIcon.x += (w - m_rectIcon.width) / 2; + m_rectHighlight.x += (w - m_rectHighlight.width) / 2; } } *m_gi; diff --git a/src/generic/listctrl.cpp b/src/generic/listctrl.cpp index 1810bb19f3..e82b217201 100644 --- a/src/generic/listctrl.cpp +++ b/src/generic/listctrl.cpp @@ -552,8 +552,7 @@ void wxListLineData::SetPosition( int x, int y, int spacing ) if ( item->HasImage() ) { - 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.x = m_gi->m_rectAll.x + 4; m_gi->m_rectIcon.y = m_gi->m_rectAll.y + 4; }