On Tue, 5 Nov 2024 16:48:04 GMT, PavelTurk <d...@openjdk.org> wrote:

> I suggest to add at least `-fx-caret-shape` with all well-known shapes, like 
> bar etc. Besides `-fx-caret-color` would be nice.

Thank you for the feedback!

I wanted not to complicate the first round with different carets.  
Nevertheless, it should be possible to either support some of the caret types 
out of the box, or allow for customization.

The default caret shape may need to depend on the input locale and/or presence 
of RTL or mixed text - something is yet to be fully addressed due to existing 
bugs, see https://bugs.openjdk.org/browse/JDK-8343557

Another topic is the "block caret", which, in my opinion, only makes sense with 
the monospaced font, maybe in the `CodeArea`.  I don't know how the block caret 
should look with the proportional fonts, or when navigating grapheme clusters 
(a bit of a pain point at the moment).

And lastly, `.caret` is a Path, so it can be styled with the CSS, see 
RichTextAreaDemoPane:183
I don't know whether additional styleable property is needed, since the app can 
just use the stylesheet or inline style, but I can be wrong.

Also (you know this already, but the wider audience may not): there is ongoing 
work in https://bugs.openjdk.org/browse/JDK-8341670 to expose more detail about 
the caret geometry (among other things) that should help third party devs with 
creating custom carets.

Thanks again!

-------------

PR Comment: https://git.openjdk.org/jfx/pull/1524#issuecomment-2457824168

Reply via email to