Re: RFR: 8355774: RichTextArea: provide mechanism for CSS styling of highlights

2025-05-08 Thread PavelTurk
Andy, I'm really glad we figured out the background-color issue, and I'm also very grateful to you! Regarding wavy lines and other types of underlining — in my previous message, I listed the key attributes that are essential for a modern CodeArea. For example, underline for links — I don't thi

Re: RFR: 8340344: The first item in TreeView is not aligned in the beginning [v2]

2025-05-08 Thread Ziad El Midaoui
On Wed, 7 May 2025 23:09:51 GMT, Andy Goryachev wrote: >> Ziad El Midaoui has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Update TreeCellSkin.java > > modules/javafx.controls/src/main/java/javafx/scene/control/skin/TreeCellSkin.java > l

Re: RFR: 8355774: RichTextArea: provide mechanism for CSS styling of highlights

2025-05-08 Thread Andy Goryachev
The only property that makes sense is the background color. The wavy and other kinds of underlines, while they make some sense in the context of the CodeArea, would fail in general in the context of RichTextArea where the content may include nodes and images. The highlights were designed speci

Re: RFR: 8340344: The first item in TreeView is not aligned in the beginning [v4]

2025-05-08 Thread Andy Goryachev
On Thu, 8 May 2025 20:16:12 GMT, Ziad El Midaoui wrote: >> The issue occurred because items preceding an item with children (items with >> a disclosure node) had different widths, which led to misalignment. This can >> be fixed by requesting a cell relayout whenever the disclosure node's width

Re: RFR: 8340344: The first item in TreeView is not aligned in the beginning [v4]

2025-05-08 Thread Ziad El Midaoui
> The issue occurred because items preceding an item with children (items with > a disclosure node) had different widths, which led to misalignment. This can > be fixed by requesting a cell relayout whenever the disclosure node's width > changes. Ziad El Midaoui has updated the pull request inc

Re: RFR: 8355774: RichTextArea: provide mechanism for CSS styling of highlights

2025-05-08 Thread PavelTurk
Since we’re talking about code styling, I would highlight the following as the main properties: - foreground color (+) - background color (-) - font (weight, italic, size, name) (+) - underline (e.g. for links) (?) - wavy underline (e.g. for spelling) (-) I think these properties cover 99% of al

Re: RFR: 8355774: RichTextArea: provide mechanism for CSS styling of highlights

2025-05-08 Thread Andy Goryachev
Oh, I finally get it what you want. Thanks! What you asking is effectively to add support for some additional properties to the class that renders the text segment (currently, Text). My first question is - what are the additional properties, beside the background-color? If it's only the back

Re: RFR: 8355774: RichTextArea: provide mechanism for CSS styling of highlights

2025-05-08 Thread PavelTurk
Andy, thank you for your reply. I have already provided some examples, but I’ll give one more very simple example that clearly illustrates the problem. I have a library that uses JFX CodeArea. Naturally, all styles are stored in a CSS file. Users of this library can customize how the code is d

Re: RFR: 8340344: The first item in TreeView is not aligned in the beginning [v3]

2025-05-08 Thread Ziad El Midaoui
On Thu, 8 May 2025 15:03:25 GMT, Andy Goryachev wrote: >> Ziad El Midaoui has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Fixed minor issues and added test > > modules/javafx.controls/src/test/java/test/javafx/scene/control/TreeViewTest.

Re: RFR: 8355774: RichTextArea: provide mechanism for CSS styling of highlights

2025-05-08 Thread Andy Goryachev
Pavel: I think your comments in the ticket are still invisible to me, so I can't comment. About your recent comment in the PR - I have difficulty understanding what you mean. We are not adding methods to "style individual properties". We are adding methods that allow the application to use C

Re: RFR: 8355774: RichTextArea: provide mechanism for CSS styling of highlights

2025-05-08 Thread PavelTurk
I am not a member of the JavaFX team, but if I may, I’d like to express my opinion. I believe that creating separate methods for styling individual properties is a very problematic and dangerous decision. First, the usefulness of such methods is minimal because when styling is done via CSS, th

Re: RFR: 8355415: RichTextArea: NPE in VFlow::scrollCaretToVisible [v2]

2025-05-08 Thread Andy Goryachev
> Fixed an NPE that should only happen in a headless test environment. > > This is a follow-up for https://github.com/openjdk/jfx/pull/1677 Andy Goryachev has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brough

RFR: 8355774: RichTextArea: provide mechanism for CSS styling of highlights

2025-05-08 Thread Andy Goryachev
Adding missing APIs related to styling the highlights with CSS: ![Screenshot 2025-05-07 at 15 08 53](https://github.com/user-attachments/assets/e37062b4-9804-40a7-872d-830fe0f584c1) Adds methods to the `RichParagraph.Builder`: /** * Adds a wavy underline (typically used as a

Re: RFR: 8340344: The first item in TreeView is not aligned in the beginning [v2]

2025-05-08 Thread Andy Goryachev
On Wed, 7 May 2025 15:56:57 GMT, Ziad El Midaoui wrote: >> The issue occurred because items preceding an item with children (items with >> a disclosure node) had different widths, which led to misalignment. This can >> be fixed by requesting a cell relayout whenever the disclosure node's width

Re: RFR: 8340344: The first item in TreeView is not aligned in the beginning [v3]

2025-05-08 Thread Andy Goryachev
On Thu, 8 May 2025 14:59:40 GMT, Ziad El Midaoui wrote: >> The issue occurred because items preceding an item with children (items with >> a disclosure node) had different widths, which led to misalignment. This can >> be fixed by requesting a cell relayout whenever the disclosure node's width

Re: RFR: 8340344: The first item in TreeView is not aligned in the beginning [v3]

2025-05-08 Thread Ziad El Midaoui
> The issue occurred because items preceding an item with children (items with > a disclosure node) had different widths, which led to misalignment. This can > be fixed by requesting a cell relayout whenever the disclosure node's width > changes. Ziad El Midaoui has updated the pull request inc

Re: RFR: 8345348: CSS media feature queries [v23]

2025-05-08 Thread Michael Strauß
On Wed, 7 May 2025 15:24:04 GMT, Andy Goryachev wrote: >> Further, if you call `setAccessibile` in connection with `--add-opens`, >> which your above code snippet does, you can even call _private_ methods. >> >> So at the risk of repeating myself, there is no concern that making this >> method