From 11dee0444f911abba5555d3be056fb64f1f5eea4 Mon Sep 17 00:00:00 2001 From: hyche Date: Thu, 23 Nov 2017 10:41:44 +0100 Subject: [PATCH] TextInput: Fix text width Thanks PulkoMandy for teaching me how to use Debugger and part of the interface kit.. Fixes #12608 Signed-off-by: Adrien Destugues Thanks for investigating and finding the problem! --- src/kits/interface/TextInput.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/kits/interface/TextInput.cpp b/src/kits/interface/TextInput.cpp index 65b178ef01..6ed6455a50 100644 --- a/src/kits/interface/TextInput.cpp +++ b/src/kits/interface/TextInput.cpp @@ -174,7 +174,7 @@ _BTextInput_::AlignTextRect() float vInset = max_c(1, floorf((textRect.Height() - LineHeight(0)) / 2.0)); float hInset = 2; - float textFontWidth = TextRect().right; + float textFontWidth = TextRect().Width(); switch (Alignment()) { case B_ALIGN_LEFT: