Fix aligning when text growing more than the right bound..

because the bound scrolls to the current cursor to view the text (ScrollToOffset).
Follow up #12608

Signed-off-by: Augustin Cavalier <waddlesplash@gmail.com>
This commit is contained in:
hyche 2017-11-23 18:43:22 +01:00 committed by Augustin Cavalier
parent 14d690378f
commit 1641a0516d
1 changed files with 2 additions and 2 deletions

View File

@ -182,12 +182,12 @@ _BTextInput_::AlignTextRect()
break;
case B_ALIGN_RIGHT:
hInset = textRect.right - textFontWidth;
hInset = textRect.Width() - textFontWidth;
hInset -= be_control_look->DefaultLabelSpacing();
break;
case B_ALIGN_CENTER:
hInset = (textRect.right - textFontWidth) / 2.0;
hInset = (textRect.Width() - textFontWidth) / 2.0;
break;
default: