From cae618d1d3745c7ec5306d475120c0fefb8861e9 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Wed, 24 Oct 2007 13:37:15 +0000 Subject: [PATCH] fix off by 1 pixel error in header drawing (patch 1819260) git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@49392 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/generic/renderg.cpp | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/src/generic/renderg.cpp b/src/generic/renderg.cpp index 0dba0f18d3..68c9b3d538 100644 --- a/src/generic/renderg.cpp +++ b/src/generic/renderg.cpp @@ -218,8 +218,6 @@ wxRendererGeneric::DrawHeaderButton(wxWindow* win, wxHeaderSortIconType sortArrow, wxHeaderButtonParams* params) { - const int CORNER = 1; - const wxCoord x = rect.x, y = rect.y, w = rect.width, @@ -232,18 +230,16 @@ wxRendererGeneric::DrawHeaderButton(wxWindow* win, dc.SetBrush(*wxTRANSPARENT_BRUSH); dc.SetPen(m_penBlack); - dc.DrawLine( x+w-CORNER+1, y, x+w, y+h ); // right (outer) - dc.DrawRectangle( x, y+h, w+1, 1 ); // bottom (outer) + dc.DrawLine( x+w-1, y, x+w-1, y+h ); // right (outer) + dc.DrawLine( x, y+h-1, x+w, y+h-1 ); // bottom (outer) dc.SetPen(m_penDarkGrey); - dc.DrawLine( x+w-CORNER, y, x+w-1, y+h ); // right (inner) - dc.DrawRectangle( x+1, y+h-1, w-2, 1 ); // bottom (inner) + dc.DrawLine( x+w-2, y+1, x+w-2, y+h-1 ); // right (inner) + dc.DrawLine( x+1, y+h-2, x+w-1, y+h-2 ); // bottom (inner) dc.SetPen(m_penHighlight); - dc.DrawRectangle( x, y, w-CORNER+1, 1 ); // top (outer) - dc.DrawRectangle( x, y, 1, h ); // left (outer) - dc.DrawLine( x, y+h-1, x+1, y+h-1 ); - dc.DrawLine( x+w-1, y, x+w-1, y+1 ); + dc.DrawLine( x, y, x, y+h-1 ); // left (outer) + dc.DrawLine( x, y, x+w-1, y ); // top (outer) return DrawHeaderButtonContents(win, dc, rect, flags, sortArrow, params); }