fixed some glitches

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2077 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Karsten Ballüder
1999-04-09 09:45:38 +00:00
parent d30b4d2007
commit 49cd56ef86

View File

@@ -1116,7 +1116,8 @@ void wxTreeCtrl::PaintItem(wxGenericTreeItem *item, wxDC& dc)
{ {
dc.SetClippingRegion( item->GetX(), item->GetY(), image_w-2, total_h ); dc.SetClippingRegion( item->GetX(), item->GetY(), image_w-2, total_h );
m_imageListNormal->Draw( item->GetSelectedImage(), dc, m_imageListNormal->Draw( item->GetSelectedImage(), dc,
item->GetX(), item->GetY()-1, item->GetX(),
item->GetY()/* +((total_h > image_h)?((total_h-image_h)/2):0)*/,
wxIMAGELIST_DRAW_TRANSPARENT ); wxIMAGELIST_DRAW_TRANSPARENT );
dc.DestroyClippingRegion(); dc.DestroyClippingRegion();
} }
@@ -1124,14 +1125,15 @@ void wxTreeCtrl::PaintItem(wxGenericTreeItem *item, wxDC& dc)
{ {
dc.SetClippingRegion( item->GetX(), item->GetY(), image_w-2, total_h ); dc.SetClippingRegion( item->GetX(), item->GetY(), image_w-2, total_h );
m_imageListNormal->Draw( item->GetImage(), dc, m_imageListNormal->Draw( item->GetImage(), dc,
item->GetX(), item->GetY()-1, item->GetX(),
item->GetY() /*+((total_h > image_h)?((total_h-image_h)/2):0)*/,
wxIMAGELIST_DRAW_TRANSPARENT ); wxIMAGELIST_DRAW_TRANSPARENT );
dc.DestroyClippingRegion(); dc.DestroyClippingRegion();
} }
dc.SetBackgroundMode(wxTRANSPARENT); dc.SetBackgroundMode(wxTRANSPARENT);
dc.DrawText( item->GetText(), image_w + item->GetX(), item->GetY() dc.DrawText( item->GetText(), image_w + item->GetX(), item->GetY()
+ (total_h > text_h)? (total_h - text_h)/2 : 0); + ((total_h > text_h) ? (total_h - text_h)/2 : 0));
// restore normal font for bold items // restore normal font for bold items
if (fontOld.Ok()) if (fontOld.Ok())