From e10bfa7a59ec34bc18863bd2ff816c30a75a6a29 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stephan=20A=C3=9Fmus?= Date: Thu, 16 Feb 2006 15:15:59 +0000 Subject: [PATCH] * round the top border offset * actually use it inside the control too git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16425 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- src/kits/interface/Box.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/kits/interface/Box.cpp b/src/kits/interface/Box.cpp index 4a60c24066..a4cd7dcfc1 100644 --- a/src/kits/interface/Box.cpp +++ b/src/kits/interface/Box.cpp @@ -102,7 +102,7 @@ BBox::TopBorderOffset() else if (fLabelView != NULL) labelHeight = fLabelView->Bounds().Height(); - return labelHeight / 2.0f; + return ceilf(labelHeight / 2.0f); } @@ -496,7 +496,7 @@ void BBox::_DrawPlain(BRect labelBox) { BRect rect = Bounds(); - rect.top += labelBox.Height() / 2.0f; + rect.top += TopBorderOffset(); rgb_color light = tint_color(ViewColor(), B_LIGHTEN_MAX_TINT); rgb_color shadow = tint_color(ViewColor(), B_DARKEN_3_TINT); @@ -518,7 +518,7 @@ void BBox::_DrawFancy(BRect labelBox) { BRect rect = Bounds(); - rect.top += labelBox.Height() / 2.0f; + rect.top += TopBorderOffset(); rgb_color light = tint_color(ViewColor(), B_LIGHTEN_MAX_TINT); rgb_color shadow = tint_color(ViewColor(), B_DARKEN_3_TINT);