use WXSIZEOF() instead of hardcoded numbers of points in the arrays
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43280 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -402,7 +402,7 @@ void wxAuiDefaultTabArt::DrawTab(wxDC& dc,
|
|||||||
clip_points[5] = wxPoint(tab_x+clip_width+1, tab_y+tab_height-3);
|
clip_points[5] = wxPoint(tab_x+clip_width+1, tab_y+tab_height-3);
|
||||||
|
|
||||||
// set the clipping region for the tab --
|
// set the clipping region for the tab --
|
||||||
wxRegion clipping_region(6, clip_points);
|
wxRegion clipping_region(WXSIZEOF(clip_points), clip_points);
|
||||||
dc.SetClippingRegion(clipping_region);
|
dc.SetClippingRegion(clipping_region);
|
||||||
|
|
||||||
wxPoint border_points[6];
|
wxPoint border_points[6];
|
||||||
@@ -476,7 +476,7 @@ void wxAuiDefaultTabArt::DrawTab(wxDC& dc,
|
|||||||
// draw tab outline
|
// draw tab outline
|
||||||
dc.SetPen(m_border_pen);
|
dc.SetPen(m_border_pen);
|
||||||
dc.SetBrush(*wxTRANSPARENT_BRUSH);
|
dc.SetBrush(*wxTRANSPARENT_BRUSH);
|
||||||
dc.DrawPolygon(6, border_points);
|
dc.DrawPolygon(WXSIZEOF(border_points), border_points);
|
||||||
|
|
||||||
// there are two horizontal grey lines at the bottom of the tab control,
|
// there are two horizontal grey lines at the bottom of the tab control,
|
||||||
// this gets rid of the top one of those lines in the tab control
|
// this gets rid of the top one of those lines in the tab control
|
||||||
@@ -949,12 +949,12 @@ void wxAuiSimpleTabArt::DrawTab(wxDC& dc,
|
|||||||
|
|
||||||
dc.SetClippingRegion(in_rect);
|
dc.SetClippingRegion(in_rect);
|
||||||
|
|
||||||
dc.DrawPolygon(6, points);
|
dc.DrawPolygon(WXSIZEOF(points) - 1, points);
|
||||||
|
|
||||||
dc.SetPen(*wxGREY_PEN);
|
dc.SetPen(*wxGREY_PEN);
|
||||||
|
|
||||||
//dc.DrawLines(active ? 6 : 7, points);
|
//dc.DrawLines(active ? WXSIZEOF(points) - 1 : WXSIZEOF(points), points);
|
||||||
dc.DrawLines(7, points);
|
dc.DrawLines(WXSIZEOF(points), points);
|
||||||
|
|
||||||
|
|
||||||
int text_offset;
|
int text_offset;
|
||||||
|
Reference in New Issue
Block a user