trying to fix the generic tree appearance problems
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@22760 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -209,18 +209,22 @@ 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, 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);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -2317,8 +2317,8 @@ void wxGenericTreeCtrl::PaintLevel( wxGenericTreeItem *item, wxDC &dc, int level
|
||||
}
|
||||
else // no custom buttons
|
||||
{
|
||||
static const int wImage = 10;
|
||||
static const int hImage = 12;
|
||||
static const int wImage = 9;
|
||||
static const int hImage = 9;
|
||||
|
||||
wxRendererNative::Get().DrawTreeItemButton
|
||||
(
|
||||
|
Reference in New Issue
Block a user