X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8f2a8de6e754cbbd6d0d7c216c5b44518fae872e..c315587c21ed44e54fbb3c1b36f0f70f78314081:/src/osx/carbon/dataview.cpp diff --git a/src/osx/carbon/dataview.cpp b/src/osx/carbon/dataview.cpp index dbb38514bf..a08481951f 100644 --- a/src/osx/carbon/dataview.cpp +++ b/src/osx/carbon/dataview.cpp @@ -353,9 +353,9 @@ wxMacDataBrowserTableViewControl::wxMacDataBrowserTableViewControl(wxWindow* pee callbacks.u.v1.itemDataCallback = gDataBrowserTableViewItemDataUPP; callbacks.u.v1.itemCompareCallback = gDataBrowserTableViewItemCompareUPP; callbacks.u.v1.itemNotificationCallback = gDataBrowserTableViewItemNotificationUPP; - callbacks.u.v1.acceptDragCallback = gDataBrowserTableViewAcceptDragUPP; - callbacks.u.v1.addDragItemCallback = gDataBrowserTableViewAddDragItemUPP; - callbacks.u.v1.receiveDragCallback = gDataBrowserTableViewReceiveDragUPP; + callbacks.u.v1.acceptDragCallback = gDataBrowserTableViewAcceptDragUPP; + callbacks.u.v1.addDragItemCallback = gDataBrowserTableViewAddDragItemUPP; + callbacks.u.v1.receiveDragCallback = gDataBrowserTableViewReceiveDragUPP; this->SetCallbacks(&callbacks); // setup callbacks for customized items: @@ -1683,7 +1683,6 @@ wxMacDataViewDataBrowserListViewControl::DataBrowserDrawItemProc(DataBrowserItem bool is_active = IsControlActive( this->m_controlRef ); if (state == kDataBrowserItemIsSelected) { - wxColour col( wxMacCreateCGColorFromHITheme( (is_active) ? kThemeBrushAlternatePrimaryHighlightColor : kThemeBrushSecondaryHighlightColor ) ); @@ -1695,14 +1694,9 @@ wxMacDataViewDataBrowserListViewControl::DataBrowserDrawItemProc(DataBrowserItem rect.x = itemrect.left-2; rect.width = itemrect.right-itemrect.left+3; - wxBrush selBrush( col ); - wxPen oldpen( dc->GetPen() ); - wxBrush oldbrush( dc->GetBrush() ); - dc->SetPen( *wxTRANSPARENT_PEN ); - dc->SetBrush( selBrush ); + wxDCPenChanger setPen(*dc, *wxTRANSPARENT_PEN); + wxDCBrushChanger setBrush(*dc, col); dc->DrawRectangle(rect); - dc->SetBrush( oldbrush ); - dc->SetPen( oldpen ); } wxDataViewModel *model = dataViewCtrlPtr->GetModel();