Tracker: Drawing issues in dragBitmap (#8005)

Remove rounding issues in height calculation leading to drawing issues when using some font sizes.
This commit is contained in:
Philippe Saint-Pierre 2012-12-25 16:24:31 -05:00
parent 9abf41a7fe
commit a74c82b977

View File

@ -419,8 +419,8 @@ DraggableContainerIcon::MouseMoved(BPoint point, uint32 /*transit*/,
font_height fontHeight;
font.GetHeight(&fontHeight);
float height = fontHeight.ascent + fontHeight.descent + fontHeight.leading
+ 2 + Bounds().Height() + 8;
float height = ceil(fontHeight.ascent + fontHeight.descent
+ fontHeight.leading + 2 + Bounds().Height() + 8);
BRect rect(0, 0, max_c(Bounds().Width(),
font.StringWidth(model->Name()) + 4), height);