[haiku-commits] haiku: hrev51357 - src/kits/interface

  • From: pulkomandy@xxxxxxxxxxxxx
  • To: haiku-commits@xxxxxxxxxxxxx
  • Date: Thu, 10 Aug 2017 20:23:15 +0200 (CEST)

hrev51357 adds 1 changeset to branch 'master'
old head: 22b7e29bc6c817ed513afd7542f77de8396930d1
new head: abb297f5db691c0cfc566fbe73bbeb712647bf1b
overview: 
http://cgit.haiku-os.org/haiku/log/?qt=range&q=abb297f5db69+%5E22b7e29bc6c8

----------------------------------------------------------------------------

abb297f5db69: 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@xxxxxxxxxxxxx>

                                          [ Wiktor <vikkindhart@xxxxxxxxx> ]

----------------------------------------------------------------------------

Revision:    hrev51357
Commit:      abb297f5db691c0cfc566fbe73bbeb712647bf1b
URL:         http://cgit.haiku-os.org/haiku/commit/?id=abb297f5db69
Author:      Wiktor <vikkindhart@xxxxxxxxx>
Date:        Mon Jun 12 16:13:30 2017 UTC
Committer:   Adrien Destugues <pulkomandy@xxxxxxxxxxxxx>
Commit-Date: Thu Aug 10 18:23:15 2017 UTC

Ticket:      https://dev.haiku-os.org/ticket/12981

----------------------------------------------------------------------------

1 file changed, 2 insertions(+), 2 deletions(-)
src/kits/interface/AbstractSpinner.cpp | 4 ++--

----------------------------------------------------------------------------

diff --git a/src/kits/interface/AbstractSpinner.cpp 
b/src/kits/interface/AbstractSpinner.cpp
index a88bc41..3625283 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) {


Other related posts:

  • » [haiku-commits] haiku: hrev51357 - src/kits/interface - pulkomandy