]> git.saurik.com Git - wxWidgets.git/blobdiff - src/generic/treectrl.cpp
better centering of text/images
[wxWidgets.git] / src / generic / treectrl.cpp
index a367847fdb1c9107daf19a189bdb65aa42723918..432d44d87bf64a3f6eaca6769081246d0ed13fc2 100644 (file)
@@ -1117,7 +1117,7 @@ void wxTreeCtrl::PaintItem(wxGenericTreeItem *item, wxDC& dc)
         dc.SetClippingRegion( item->GetX(), item->GetY(), image_w-2, total_h );
         m_imageListNormal->Draw( item->GetSelectedImage(), dc,
                                  item->GetX(),
-                                 item->GetY()/* +((total_h > image_h)?((total_h-image_h)/2):0)*/,
+                                 item->GetY() +((total_h > image_h)?((total_h-image_h)/2):0),
                                  wxIMAGELIST_DRAW_TRANSPARENT );
         dc.DestroyClippingRegion();
     }
@@ -1126,7 +1126,7 @@ void wxTreeCtrl::PaintItem(wxGenericTreeItem *item, wxDC& dc)
         dc.SetClippingRegion( item->GetX(), item->GetY(), image_w-2, total_h );
         m_imageListNormal->Draw( item->GetImage(), dc,
                                  item->GetX(),
-                                 item->GetY() /*+((total_h > image_h)?((total_h-image_h)/2):0)*/,
+                                 item->GetY() +((total_h > image_h)?((total_h-image_h)/2):0),
                                  wxIMAGELIST_DRAW_TRANSPARENT );
         dc.DestroyClippingRegion();
     }