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 <pulkomandy@pulkomandy.tk>
This commit is contained in:
Wiktor 2017-06-12 18:13:30 +02:00 committed by Adrien Destugues
parent 22b7e29bc6
commit abb297f5db

View File

@ -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) {