RFR: 8178368: Right alignment of text fields and alignment of prompt text works incorrectly [v5]
John Hendrikx
jhendrikx at openjdk.org
Fri Feb 24 07:03:17 UTC 2023
On Fri, 24 Feb 2023 06:26:21 GMT, Karthik P K <kpk at openjdk.org> wrote:
> > I think this class may benefit from a few tests that test with a very wide caret, to see if positioning is what you'd expect in those cases as well. I get the impression a lot of the code assumes a narrow caret (1 or 2 pixels) and this is why we see constants like `0` and `1` in the code, and even places where the caret width should be subtracted but isn't because it is assumed to be `0`.
>
> Since caret width is hard coded and there is no direct way of changing the width, I believe we can proceed without adding tests with wide caret.
Yeah, that's okay; it seems to make a lot of assumptions about the caret, even going as far as ignoring a caret with exactly 4 path elements (as apparently there is no way to ask if it is a split caret when RTL/LTR mixed text is encountered). I guess those will need to tackled if we ever change the caret shape.
-------------
PR: https://git.openjdk.org/jfx/pull/980
More information about the openjfx-dev
mailing list