No real changes, just small cleanup in wxMac wxDVC.
Use wxDC{Pen,Brush}Changer classes instead of setting/restoring pen and brush manually. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@62156 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1683,7 +1683,6 @@ wxMacDataViewDataBrowserListViewControl::DataBrowserDrawItemProc(DataBrowserItem
|
|||||||
bool is_active = IsControlActive( this->m_controlRef );
|
bool is_active = IsControlActive( this->m_controlRef );
|
||||||
if (state == kDataBrowserItemIsSelected)
|
if (state == kDataBrowserItemIsSelected)
|
||||||
{
|
{
|
||||||
|
|
||||||
wxColour col( wxMacCreateCGColorFromHITheme( (is_active) ?
|
wxColour col( wxMacCreateCGColorFromHITheme( (is_active) ?
|
||||||
kThemeBrushAlternatePrimaryHighlightColor
|
kThemeBrushAlternatePrimaryHighlightColor
|
||||||
: kThemeBrushSecondaryHighlightColor ) );
|
: kThemeBrushSecondaryHighlightColor ) );
|
||||||
@@ -1695,14 +1694,9 @@ wxMacDataViewDataBrowserListViewControl::DataBrowserDrawItemProc(DataBrowserItem
|
|||||||
rect.x = itemrect.left-2;
|
rect.x = itemrect.left-2;
|
||||||
rect.width = itemrect.right-itemrect.left+3;
|
rect.width = itemrect.right-itemrect.left+3;
|
||||||
|
|
||||||
wxBrush selBrush( col );
|
wxDCPenChanger setPen(*dc, *wxTRANSPARENT_PEN);
|
||||||
wxPen oldpen( dc->GetPen() );
|
wxDCBrushChanger setBrush(*dc, col);
|
||||||
wxBrush oldbrush( dc->GetBrush() );
|
|
||||||
dc->SetPen( *wxTRANSPARENT_PEN );
|
|
||||||
dc->SetBrush( selBrush );
|
|
||||||
dc->DrawRectangle(rect);
|
dc->DrawRectangle(rect);
|
||||||
dc->SetBrush( oldbrush );
|
|
||||||
dc->SetPen( oldpen );
|
|
||||||
}
|
}
|
||||||
|
|
||||||
wxDataViewModel *model = dataViewCtrlPtr->GetModel();
|
wxDataViewModel *model = dataViewCtrlPtr->GetModel();
|
||||||
|
Reference in New Issue
Block a user