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:
parent
22b7e29bc6
commit
abb297f5db
@ -1452,7 +1452,7 @@ BAbstractSpinner::_DrawLabel(BRect updateRect)
|
|||||||
float y = rect.top
|
float y = rect.top
|
||||||
+ roundf((rect.Height() + 1.0f - fontHeight.ascent
|
+ roundf((rect.Height() + 1.0f - fontHeight.ascent
|
||||||
- fontHeight.descent) / 2.0f)
|
- fontHeight.descent) / 2.0f)
|
||||||
+ fontHeight.ascent + kFrameMargin * 2;
|
+ fontHeight.ascent;
|
||||||
|
|
||||||
uint32 flags = be_control_look->Flags(this);
|
uint32 flags = be_control_look->Flags(this);
|
||||||
|
|
||||||
@ -1624,7 +1624,7 @@ BAbstractSpinner::_ValidateLayoutData()
|
|||||||
if (fLayoutData->valid)
|
if (fLayoutData->valid)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
font_height fontHeight = fLayoutData->font_info;
|
font_height& fontHeight = fLayoutData->font_info;
|
||||||
GetFontHeight(&fontHeight);
|
GetFontHeight(&fontHeight);
|
||||||
|
|
||||||
if (Label() != NULL) {
|
if (Label() != NULL) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user