X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/8b04a037d02d0471d2f92a3ddda374848feea8b1..f92722960b2a15f813cc62a23ecb321bc0555099:/src/generic/treectrl.cpp diff --git a/src/generic/treectrl.cpp b/src/generic/treectrl.cpp index cf6d5042e1..eeb663680f 100644 --- a/src/generic/treectrl.cpp +++ b/src/generic/treectrl.cpp @@ -317,8 +317,9 @@ wxGenericTreeItem *wxGenericTreeItem::HitTest( const wxPoint& point, int image_h; // assuming every image (normal and selected ) has the same size ! - if (theTree->m_imageListNormal) + if ((m_image!=-1) && theTree->m_imageListNormal) theTree->m_imageListNormal->GetSize(m_image, image_w, image_h); + if ((image_w != -1) && (point.x <= m_x + image_w + 1)) flags|=wxTREE_HITTEST_ONITEMICON; else @@ -410,7 +411,7 @@ bool wxTreeCtrl::Create(wxWindow *parent, wxWindowID id, #endif SetBackgroundColour( *wxWHITE ); - m_dottedPen = wxPen( *wxBLACK, 0, 0 ); + m_dottedPen = wxPen( "GREY", 0, wxDOT ); return TRUE; } @@ -1390,13 +1391,13 @@ void wxTreeCtrl::PaintLevel( wxGenericTreeItem *item, wxDC &dc, int level, int & dc.SetPen( *wxGREY_PEN ); dc.SetBrush( *wxWHITE_BRUSH ); dc.DrawRectangle( horizX+(m_indent-5), y-4, 11, 9 ); + dc.SetPen( *wxBLACK_PEN ); dc.DrawLine( horizX+(m_indent-2), y, horizX+(m_indent+3), y ); - if (!item->IsExpanded()) - { dc.DrawLine( horizX+m_indent, y-2, horizX+m_indent, y+3 ); - } + + dc.SetPen( m_dottedPen ); } if (item->HasHilight()) @@ -1412,7 +1413,7 @@ void wxTreeCtrl::PaintLevel( wxGenericTreeItem *item, wxDC &dc, int level, int & PaintItem(item, dc); - dc.SetPen( *wxBLACK_PEN ); + dc.SetPen( m_dottedPen ); dc.SetTextForeground( *wxBLACK ); dc.SetBrush( *wxWHITE_BRUSH ); } @@ -1423,7 +1424,7 @@ void wxTreeCtrl::PaintLevel( wxGenericTreeItem *item, wxDC &dc, int level, int & PaintItem(item, dc); - dc.SetPen( *wxBLACK_PEN ); + dc.SetPen( m_dottedPen ); } }