InnerFrame() used fLabelBox, but it has to take the font's descent into account.
git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@16336 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
ef4aa90f49
commit
405bf9da6e
|
@ -114,9 +114,13 @@ BBox::InnerFrame()
|
||||||
: Border() == B_PLAIN_BORDER ? 1.0f : 0.0f;
|
: Border() == B_PLAIN_BORDER ? 1.0f : 0.0f;
|
||||||
float labelHeight = 0.0f;
|
float labelHeight = 0.0f;
|
||||||
|
|
||||||
if (fLabel != NULL)
|
if (fLabel != NULL) {
|
||||||
labelHeight = fLabelBox->Height();
|
// fLabelBox doesn't contain the font's descent, but we want it here
|
||||||
else if (fLabelView != NULL)
|
font_height fontHeight;
|
||||||
|
GetFontHeight(&fontHeight);
|
||||||
|
|
||||||
|
labelHeight = ceilf(fontHeight.ascent + fontHeight.descent);
|
||||||
|
} else if (fLabelView != NULL)
|
||||||
labelHeight = fLabelView->Bounds().Height();
|
labelHeight = fLabelView->Bounds().Height();
|
||||||
|
|
||||||
BRect rect = Bounds().InsetByCopy(borderSize, borderSize);
|
BRect rect = Bounds().InsetByCopy(borderSize, borderSize);
|
||||||
|
|
Loading…
Reference in New Issue