From 0ce4c781b5f91ead7a778da91df29f5429fe271b Mon Sep 17 00:00:00 2001
From: Wiktor <vikkindhart@gmail.com>
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.
---
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 a88bc41..3625283 100644
a
|
b
|
BAbstractSpinner::_DrawLabel(BRect updateRect)
|
1452 | 1452 | float y = rect.top |
1453 | 1453 | + roundf((rect.Height() + 1.0f - fontHeight.ascent |
1454 | 1454 | - fontHeight.descent) / 2.0f) |
1455 | | + fontHeight.ascent + kFrameMargin * 2; |
| 1455 | + fontHeight.ascent; |
1456 | 1456 | |
1457 | 1457 | uint32 flags = be_control_look->Flags(this); |
1458 | 1458 | |
… |
… |
BAbstractSpinner::_ValidateLayoutData()
|
1624 | 1624 | if (fLayoutData->valid) |
1625 | 1625 | return; |
1626 | 1626 | |
1627 | | font_height fontHeight = fLayoutData->font_info; |
| 1627 | font_height& fontHeight = fLayoutData->font_info; |
1628 | 1628 | GetFontHeight(&fontHeight); |
1629 | 1629 | |
1630 | 1630 | if (Label() != NULL) { |