]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/treectrl.cpp
Mini-fix for wxStaticBitmap
[wxWidgets.git] / src / generic / treectrl.cpp
index cf6d5042e1b255d49a4d10f0bb08b4c0dbb074b2..eeb663680fd3cfa6f73077a1b3810afd0df8755d 100644 (file)
@@ -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 );
         }
     }