RFR: 8178368: Right alignment of text fields and alignment of prompt text works incorrectly [v5]
Karthik P K
kpk at openjdk.org
Fri Feb 24 09:32:27 UTC 2023
On Thu, 23 Feb 2023 09:11:05 GMT, John Hendrikx <jhendrikx at openjdk.org> wrote:
>> Karthik P K has updated the pull request incrementally with one additional commit since the last revision:
>>
>> Fix text and prompt alignment issue
>
> modules/javafx.controls/src/main/java/javafx/scene/control/skin/TextFieldSkin.java line 839:
>
>> 837: } else if (newX < 0 && oldX > 1) {
>> 838: textTranslateX.set(caretWidth / 2);
>> 839: }
>
> Again, I don't think its correct. It's just odd that `newX` may be smaller than `caretWidth / 2` but is accepted, but when the text is too wide the "minimum" value suddenly is `caretWidth / 2`.
Same comment as above for `newX` comparison with `caretWidth/2`. Updated `caretWidth/2` instead of 1 while comparing `oldX` value.
-------------
PR: https://git.openjdk.org/jfx/pull/980
More information about the openjfx-dev
mailing list