X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/936632d3b227834f176f962e77377c194608ce71..13e24d79876b78545ba300e6b6871bc47af60848:/src/generic/listctrl.cpp diff --git a/src/generic/listctrl.cpp b/src/generic/listctrl.cpp index 7fd022e786..27b1c3f0e9 100644 --- a/src/generic/listctrl.cpp +++ b/src/generic/listctrl.cpp @@ -3704,6 +3704,19 @@ void wxListMainWindow::SetColumnWidth( int col, int width ) if (width == wxLIST_AUTOSIZE_USEHEADER) { width = GetTextLength(column->GetText()); + width += 2*EXTRA_WIDTH; + + // check for column header's image availability + const int image = column->GetImage(); + if ( image != -1 ) + { + if ( m_small_image_list ) + { + int ix = 0, iy = 0; + m_small_image_list->GetSize(image, ix, iy); + width += ix + HEADER_IMAGE_MARGIN_IN_REPORT_MODE; + } + } } else if ( width == wxLIST_AUTOSIZE ) { @@ -5164,7 +5177,7 @@ wxUIntPtr wxGenericListCtrl::GetItemData( long item ) const return info.m_data; } -bool wxGenericListCtrl::SetItemData( long item, long data ) +bool wxGenericListCtrl::SetItemPtrData( long item, wxUIntPtr data ) { wxListItem info; info.m_mask = wxLIST_MASK_DATA;