Applied a slightly changed patch by cl21: changed how the BListItem layouts

its text contents. This fixes bug #619. Thanks!


git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@23046 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler 2007-12-01 19:51:56 +00:00
parent ccaac177f6
commit fc8ffb64ec

View File

@ -346,9 +346,10 @@ BStringItem::Update(BView *owner, const BFont *font)
font_height fheight;
font->GetHeight(&fheight);
fBaselineOffset = fheight.ascent + fheight.leading;
SetHeight((float)ceil(fheight.ascent + fheight.descent +
fheight.leading) + 4);
fBaselineOffset = fheight.ascent + 2 + floorf(fheight.leading / 2);
SetHeight(ceilf(fheight.ascent) + ceilf(fheight.descent)
+ ceilf(fheight.leading) + 4);
}