From a74c82b9773ea7ac069a3515adca66b22872f468 Mon Sep 17 00:00:00 2001 From: Philippe Saint-Pierre Date: Tue, 25 Dec 2012 16:24:31 -0500 Subject: [PATCH] Tracker: Drawing issues in dragBitmap (#8005) Remove rounding issues in height calculation leading to drawing issues when using some font sizes. --- src/kits/tracker/ContainerWindow.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/kits/tracker/ContainerWindow.cpp b/src/kits/tracker/ContainerWindow.cpp index d5ede41227..6b2611cfcf 100644 --- a/src/kits/tracker/ContainerWindow.cpp +++ b/src/kits/tracker/ContainerWindow.cpp @@ -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);