X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/0872a451dc8f44e3315170efa8b2e396ba2a18df..1978421a6d8b81c1f8a961da4b8ddf544fec7b1b:/src/generic/renderg.cpp diff --git a/src/generic/renderg.cpp b/src/generic/renderg.cpp index 9e66312b2d..5f7f0074c3 100644 --- a/src/generic/renderg.cpp +++ b/src/generic/renderg.cpp @@ -71,6 +71,13 @@ public: virtual wxSplitterRenderParams GetSplitterParams(const wxWindow *win); + virtual wxRendererVersion GetVersion() const + { + return wxRendererVersion(wxRendererVersion::Current_Version, + wxRendererVersion::Current_Age); + } + + // Cleanup by deleting standard renderer static void Cleanup(); @@ -202,18 +209,24 @@ wxRendererGeneric::DrawTreeItemButton(wxWindow * WXUNUSED(win), // white background dc.SetPen(*wxGREY_PEN); dc.SetBrush(*wxWHITE_BRUSH); - dc.DrawRectangle(rect.Deflate(1, 2)); + dc.DrawRectangle(rect); // black lines const wxCoord xMiddle = rect.x + rect.width/2; const wxCoord yMiddle = rect.y + rect.height/2; + // half of the length of the horz lines in "-" and "+" + const wxCoord halfWidth = rect.width/2 - 2; dc.SetPen(*wxBLACK_PEN); - dc.DrawLine(xMiddle - 2, yMiddle, xMiddle + 3, yMiddle); + dc.DrawLine(xMiddle - halfWidth, yMiddle, + xMiddle + halfWidth + 1, yMiddle); + if ( !(flags & wxCONTROL_EXPANDED) ) { // turn "-" into "+" - dc.DrawLine(xMiddle, yMiddle - 2, xMiddle, yMiddle + 3); + const wxCoord halfHeight = rect.height/2 - 2; + dc.DrawLine(xMiddle, yMiddle - halfHeight, + xMiddle, yMiddle + halfHeight + 1); } }