From 1419175c27a9d6a16a159ba894ae7ad662b01bb8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Thu, 10 Nov 2005 14:47:31 +0000 Subject: [PATCH] The FontSelectionView's preferred height was one pixel too large. Now use ceil() instead of floor() to compute the complete font height. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@14822 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/preferences/fonts/FontSelectionView.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/preferences/fonts/FontSelectionView.cpp b/src/preferences/fonts/FontSelectionView.cpp index e74c3976c8..6034454413 100644 --- a/src/preferences/fonts/FontSelectionView.cpp +++ b/src/preferences/fonts/FontSelectionView.cpp @@ -104,7 +104,7 @@ FontSelectionView::FontSelectionView(BRect rect, const char* name, font.SetSize(kMaxSize); font_height height; font.GetHeight(&height); - rect.bottom = rect.top + floorf(height.ascent + height.descent + height.leading) + 5; + rect.bottom = rect.top + ceil(height.ascent + height.descent + height.leading) + 5; fPreviewBox = new BBox(rect, "preview", B_FOLLOW_LEFT_RIGHT, B_WILL_DRAW | B_FRAME_EVENTS); @@ -144,7 +144,7 @@ FontSelectionView::GetPreferredSize(float *_width, float *_height) if (_height) { BView* view = FindView("preview"); if (view != NULL) - *_height = view->Frame().bottom + 1; + *_height = view->Frame().bottom; } }