From abb297f5db691c0cfc566fbe73bbeb712647bf1b Mon Sep 17 00:00:00 2001 From: Wiktor Date: Mon, 12 Jun 2017 18:13:30 +0200 Subject: [PATCH] InterfaceKit: fixed BSpinner's label rendering. A '&' (reference) was missing on a specific line, causing font information to never be updated. Also removed extra padding dependent on a constant variable - if it is used, the label will be render too far down. Fixes #12981. Signed-off-by: Adrien Destugues --- src/kits/interface/AbstractSpinner.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/kits/interface/AbstractSpinner.cpp b/src/kits/interface/AbstractSpinner.cpp index a88bc412db..3625283047 100644 --- a/src/kits/interface/AbstractSpinner.cpp +++ b/src/kits/interface/AbstractSpinner.cpp @@ -1452,7 +1452,7 @@ BAbstractSpinner::_DrawLabel(BRect updateRect) float y = rect.top + roundf((rect.Height() + 1.0f - fontHeight.ascent - fontHeight.descent) / 2.0f) - + fontHeight.ascent + kFrameMargin * 2; + + fontHeight.ascent; uint32 flags = be_control_look->Flags(this); @@ -1624,7 +1624,7 @@ BAbstractSpinner::_ValidateLayoutData() if (fLayoutData->valid) return; - font_height fontHeight = fLayoutData->font_info; + font_height& fontHeight = fLayoutData->font_info; GetFontHeight(&fontHeight); if (Label() != NULL) {