-
Notifications
You must be signed in to change notification settings - Fork 237
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Dotted underline #317
Dotted underline #317
Conversation
Very cool! Can I propose to change the the names of CSS properties to omit the word "stroke", which kind of refers to the implementation detail that the visible underline is actually a stroke of a I suggest -fx-underline-color
-fx-underline-width
-fx-underline-dash-size Marking just the word I wasn't quite happy with the implementation of the background, because it creates the background For good looking results, it might also be necessary to join the underlines of neighboring segment, if they specify the same underline style, into one. This would be less of a problem with solid lines, but adjacent dashed lines will look ugly. |
Hi Tomas,
With |
Looks good 👍 Thanks for the contribution! |
@afester Am I correct in understanding that the underline CSS properties you added take affect regardless of |
@JordanMartinez yes, as of now that is correct. Probably we should change that though - I will Check when I am back from vacation... |
What @afester implemented is much richer than the pre-existing |
@afester ok. Enjoy your vacation 🍹 @TomasMikula what should the naming scheme be then? |
@JordanMartinez Ideally the |
I have an idea for the name scheme. Since the In order words, the CSS you've implemented would be renamed to:
|
Yes, that makes sense. I would then also add |
A non-zero width can serve as the toggle. To choose from different styles of the line, we could have
with |
Ok, that is fine. We should not need |
One (final) thought: Should we not use a custom prefix for RichTextFX specific CSS property names, like The property names could then be like
|
Well, |
I'll file a new issue to update the RTFX-specific CSS to use the |
I have updated the property names and the behaviour wrt. the non-zero width in #324.
Yes, but you can define simple dotted lines already now, like
Squiggly/waved/triangled underlines (often seen in IDEs like Eclipse), or even a completely custom rendering is if course another thing, which could be added later, now that we have the required path segments/coordinates which make up the underline ... |
Proposal to implement solution for issue #316: "Dotted underline".
This patch adds a path to render underlines for text segments.
The segments can be styled through the following CSS properties:
The patch contains an enhancement of the JavaKeywords example where the word "simplements" is underlined: