more long/double to int conversion warnings from HP-UX logs fixed

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@6140 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2000-02-18 20:20:15 +00:00
parent 7d533797a0
commit 6cedba093a
3 changed files with 15 additions and 14 deletions

View File

@@ -1556,7 +1556,7 @@ void wxTreeCtrl::PaintItem(wxGenericTreeItem *item, wxDC& dc)
}
dc.SetBackgroundMode(wxTRANSPARENT);
dc.DrawText( item->GetText(), image_w + item->GetX(), item->GetY()
dc.DrawText( item->GetText(), image_w + item->GetX(), (wxCoord)item->GetY()
+ ((total_h > text_h) ? (total_h - text_h)/2 : 0));
// restore normal font
@@ -2116,8 +2116,8 @@ void wxTreeCtrl::OnIdle( wxIdleEvent &WXUNUSED(event) )
void wxTreeCtrl::CalculateSize( wxGenericTreeItem *item, wxDC &dc )
{
long text_w = 0;
long text_h = 0;
int text_w = 0;
int text_h = 0;
if (item->IsBold())
dc.SetFont(m_boldFont);
@@ -2145,7 +2145,8 @@ void wxTreeCtrl::CalculateSize( wxGenericTreeItem *item, wxDC &dc )
total_h += total_h/10; // otherwise 10% extra spacing
item->SetHeight(total_h);
if (total_h>m_lineHeight) m_lineHeight=total_h;
if (total_h>m_lineHeight)
m_lineHeight=total_h;
item->SetWidth(image_w+text_w+2);
}