Ticket #3674: patch

File patch, 1.3 KB (added by stpere, 15 years ago)
  • CalcView.cpp

     
    66 * Authors:
    77 *      Timothy Wayper <timmy@wunderbear.com>
    88 *      Stephan Aßmus <superstippi@gmx.de>
     9 *      Philippe Saint-Pierre, stpere@gmail.com
    910 */
    1011
    1112#include "CalcView.h"
     
    203204    if (be_control_look == NULL)
    204205        SetFont(be_bold_font);
    205206
    206     BRect frame(Frame());
    207     FrameResized(frame.Width(), frame.Height());
    208 
    209207    fPopUpMenu->SetTargetForItems(this);
    210208    _ShowKeypad(fOptions->show_keypad);
    211209}
     
    656654    fExpressionTextView->MoveTo(frame.LeftTop());
    657655    fExpressionTextView->ResizeTo(frame.Width(), frame.Height());
    658656
    659     frame.OffsetTo(B_ORIGIN);
    660     float inset = (frame.Height() - fExpressionTextView->LineHeight(0)) / 2;
    661     frame.InsetBy(inset, inset);
    662     fExpressionTextView->SetTextRect(frame);
    663 
    664657    // configure expression text view font size and color
    665658    float sizeDisp = fShowKeypad ? fHeight * kDisplayScaleY : fHeight;
    666659    BFont font(be_bold_font);
    667660    font.SetSize(sizeDisp * kExpressionFontScaleY);
    668661    fExpressionTextView->SetFontAndColor(&font, B_FONT_ALL);
     662
     663    frame.OffsetTo(B_ORIGIN);
     664    float inset = (frame.Height() - fExpressionTextView->LineHeight(0)) / 2;
     665    frame.InsetBy(inset, inset);
     666    fExpressionTextView->SetTextRect(frame);
    669667}
    670668
    671669