X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/6239ee05567eac71754f56c2a154222d10b57ff1..4ccb5877f76c068ce600a7660bb1efc1e3e1c154:/src/mac/carbon/listctrl_mac.cpp diff --git a/src/mac/carbon/listctrl_mac.cpp b/src/mac/carbon/listctrl_mac.cpp index 6fbe91e190..66046b29ca 100644 --- a/src/mac/carbon/listctrl_mac.cpp +++ b/src/mac/carbon/listctrl_mac.cpp @@ -980,13 +980,13 @@ bool wxListCtrl::SetColumn(int col, wxListItem& item) if (item.GetMask() & wxLIST_MASK_IMAGE && item.GetImage() != -1 ) { - columnDesc.btnContentInfo.contentType = kControlContentIconRef; wxImageList* imageList = GetImageList(wxIMAGE_LIST_SMALL); if (imageList && imageList->GetImageCount() > 0 ) { wxBitmap bmp = imageList->GetBitmap( item.GetImage() ); - IconRef icon = bmp.GetBitmapData()->GetIconRef(); + IconRef icon = bmp.GetIconRef(); columnDesc.btnContentInfo.u.iconRef = icon; + columnDesc.btnContentInfo.contentType = kControlContentIconRef; } } @@ -2510,9 +2510,7 @@ wxMacDataBrowserListCtrlControl::wxMacDataBrowserListCtrlControl( wxWindow *peer if ( style & wxLC_VRULES ) { -#if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4 verify_noerr( DataBrowserChangeAttributes(m_controlRef, kDataBrowserAttributeListViewDrawColumnDividers, kDataBrowserAttributeNone) ); -#endif } verify_noerr( SetHiliteStyle(kDataBrowserTableViewFillHilite ) ); @@ -2731,13 +2729,13 @@ void wxMacDataBrowserListCtrlControl::DrawItem( { if (color.Ok()) - labelColor = MAC_WXCOLORREF( color.GetPixel() ); + color.GetRGBColor(&labelColor); else if (list->GetTextColour().Ok()) - labelColor = MAC_WXCOLORREF( list->GetTextColour().GetPixel() ); + list->GetTextColour().GetRGBColor(&labelColor); if (bgColor.Ok()) { - backgroundColor = MAC_WXCOLORREF( bgColor.GetPixel() ); + bgColor.GetRGBColor(&backgroundColor); CGContextSaveGState(context); CGContextSetRGBFillColor(context, (float)backgroundColor.red / (float)USHRT_MAX, @@ -2756,7 +2754,7 @@ void wxMacDataBrowserListCtrlControl::DrawItem( wxImageList* imageList = list->GetImageList(wxIMAGE_LIST_SMALL); if (imageList && imageList->GetImageCount() > 0){ wxBitmap bmp = imageList->GetBitmap(imgIndex); - IconRef icon = bmp.GetBitmapData()->GetIconRef(); + IconRef icon = bmp.GetIconRef(); CGContextSaveGState(context); CGContextTranslateCTM(context, 0,iconCGRect.origin.y + CGRectGetMaxY(iconCGRect)); @@ -2897,7 +2895,7 @@ OSStatus wxMacDataBrowserListCtrlControl::GetSetItemData(DataBrowserItemID itemI wxImageList* imageList = list->GetImageList(wxIMAGE_LIST_SMALL); if (imageList && imageList->GetImageCount() > 0){ wxBitmap bmp = imageList->GetBitmap(imgIndex); - IconRef icon = bmp.GetBitmapData()->GetIconRef(); + IconRef icon = bmp.GetIconRef(); ::SetDataBrowserItemDataIcon(itemData, icon); } }