Ticket #2509: ArcTextControl.diff
File ArcTextControl.diff, 1.4 KB (added by , 16 years ago) |
---|
-
src/kits/interface/TextControl.cpp
733 733 if (fText == NULL) { 734 734 BRect frame(fDivider, bounds.top, 735 735 bounds.right, bounds.bottom); 736 // we are stroking the frame around the text view, which737 // is 2 pixels wide738 frame.InsetBy(2.0, 3.0);739 BRect textRect(frame.OffsetToCopy(B_ORIGIN));740 736 741 fText = new BPrivate::_BTextInput_(frame, textRect,737 fText = new BPrivate::_BTextInput_(frame, frame, 742 738 B_FOLLOW_LEFT_RIGHT | B_FOLLOW_TOP, 743 739 B_WILL_DRAW | B_FRAME_EVENTS | navigableFlags); 744 740 AddChild(fText); -
src/kits/interface/TextInput.cpp
156 156 // is one pixel spacing on each side 157 157 BRect textRect(Bounds()); 158 158 textRect.left = 0.0; 159 float vInset = max_c(1, floorf((textRect.Height() - LineHeight(0)) / 2.0)); 159 160 font_height fontHeight; 161 GetFontHeight(&fontHeight); 162 163 float vInset = max_c(1, floorf((textRect.Height() - fontHeight.ascent 164 - fontHeight.descent - fontHeight.leading) / 2.0)); 160 165 textRect.InsetBy(2, vInset); 161 166 SetTextRect(textRect); 162 167 }