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

2025-05-07 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: CodeArea: -fx-background-color doesn't work.

2025-05-07 Thread PavelTurk
Andy, thank you for such a detailed reply. Unfortunately, I believe this direction is misguided and should be avoided. That’s why I’ve added further information to JDK-8356436. Best regards, Pavel On 5/7/25 22:14, Andy Goryachev wrote: > Could you please confirm whether RichParagraph.Builde

Re: RFR: 8350316: Create implementation of NSAccessibilityProgressIndicator protocol [v2]

2025-05-07 Thread Andy Goryachev
On Wed, 7 May 2025 15:42:03 GMT, Alexander Zuev wrote: >> Initial implementation. In order to implement progress indicator the group >> accessibility protocol has to be implemented too so this is also a fix for >> 8351773. There are commented out sections that can be used to verify the >> func

Re: RFR: 8350316: Create implementation of NSAccessibilityProgressIndicator protocol [v2]

2025-05-07 Thread Alexander Zuev
On Wed, 7 May 2025 15:43:18 GMT, Andy Goryachev wrote: > so the group protocol is **not** needed for the progress bar/indicator? What? It is required see the definition for the interface: `@interface JFXProgressIndicatorAccessibility : JFXGroupAccessibility` - PR Comment: h

Re: RFR: 8354943: [Linux] Simplify and update glass gtk backend: window sizing, positioning, and state management issues [v18]

2025-05-07 Thread Thiago Milczarek Sayao
On Wed, 7 May 2025 19:50:25 GMT, Martin Fox wrote: >> But `stage1` is the owner of `stage2` > > When stage2 is created you pass in stage0 as the owner, not stage1. Sorry, my bad, you're right. I now hide in shame.. - PR Review Comment: https://git.openjdk.org/jfx/pull/1789#discussi

Re: RFR: 8354943: [Linux] Simplify and update glass gtk backend: window sizing, positioning, and state management issues [v18]

2025-05-07 Thread Martin Fox
On Wed, 7 May 2025 18:45:37 GMT, Thiago Milczarek Sayao wrote: >> tests/system/src/test/java/test/robot/javafx/stage/StageOwnershipTest.java >> line 436: >> >>> 434: stage2::show, >>> 435: stage2::close, >>> 436: () -> assertTrue(stage1.isFocused

Re: CodeArea: -fx-background-color doesn't work.

2025-05-07 Thread Andy Goryachev
> Could you please confirm whether > RichParagraph.Builder.addWithStyleNames(String text, String... css) can also > be used for background coloring? No, it cannot. This (and other methods that add a text segment), while adding the style names to the underlying nodes, cannot style the backgroun

Re: CodeArea: -fx-background-color doesn't work.

2025-05-07 Thread PavelTurk
I've read your comments on the issue and was actually in the process of writing to you when I received your message. Let me clarify a critically important point. Currently, to style segment text using CSS style classes, we use this method: RichParagraph.Builder.addWithStyleNames(String text, Str

Re: RFR: 8354943: [Linux] Simplify and update glass gtk backend: window sizing, positioning, and state management issues [v18]

2025-05-07 Thread Thiago Milczarek Sayao
On Wed, 7 May 2025 14:00:28 GMT, Lukasz Kostyra wrote: > I think the GTK changes are fine, however the tests need some addressing. > > On Linux (Ubuntu 24.04.2 VM) I see consistently failing two tests: > > ``` > StageOwnershipTest. testClosingAppModalShouldFocusParent(StageStyle) [1] > DEC

Re: RFR: 8354943: [Linux] Simplify and update glass gtk backend: window sizing, positioning, and state management issues [v18]

2025-05-07 Thread Thiago Milczarek Sayao
On Wed, 7 May 2025 15:41:02 GMT, Lukasz Kostyra wrote: > One more thing about `SizingTest.testMinSize` on Windows, I found this JBS > bug - [JDK-8310845 - Size-restricted window reports incorrect dimensions on > Linux](https://bugs.openjdk.org/browse/JDK-8310845) - which seems to be a > simila

Re: RFR: 8354943: [Linux] Simplify and update glass gtk backend: window sizing, positioning, and state management issues [v18]

2025-05-07 Thread Thiago Milczarek Sayao
On Wed, 7 May 2025 17:11:17 GMT, Martin Fox wrote: >> Thiago Milczarek Sayao has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Fix non-debug build > > tests/system/src/test/java/test/robot/javafx/stage/StageOwnershipTest.java > line 436:

Re: CodeArea: -fx-background-color doesn't work.

2025-05-07 Thread Andy Goryachev
Thank you for the feedback! I finally got the ticket - https://bugs.openjdk.org/browse/JDK-8356436 . It's a dup of https://bugs.openjdk.org/browse/JDK-8355774 , essentially. Once the missing APIs are added, you'll be able to style the highlights with CSS: RichParagraph.Builder#addHighlight(in

Re: RFR: 8354943: [Linux] Simplify and update glass gtk backend: window sizing, positioning, and state management issues [v19]

2025-05-07 Thread Thiago Milczarek Sayao
> This is a continuation to > [JDK-8236651](https://bugs.openjdk.org/browse/JDK-8236651) and it aims to > stabilize the linux glass gtk backend. > > > Overall, it has been made more robust within its scope, particularly in terms > of sizing, positioning, and state management. > > List of chan

Re: CodeArea: -fx-background-color doesn't work.

2025-05-07 Thread Andy Goryachev
This bug is still percolating through the system. I'll respond once I get it. Thank you for all the questions and the feedback! -andy From: openjfx-dev on behalf of PavelTurk Date: Monday, May 5, 2025 at 14:13 To: openjfx-dev@openjdk.org Subject: Re: CodeArea: -fx-background-color doesn't

Re: CodeArea: -fx-background-color doesn't work.

2025-05-07 Thread PavelTurk
Andy, thank you very much for your help! Best regards, Pavel On 5/7/25 20:29, Andy Goryachev wrote: This bug is still percolating through the system.  I'll respond once I get it. Thank you for all the questions and the feedback! -andy *From: *openjfx-dev on behalf of PavelTurk *Date: *Mo

Re: RFR: 8354943: [Linux] Simplify and update glass gtk backend: window sizing, positioning, and state management issues [v18]

2025-05-07 Thread Martin Fox
On Wed, 7 May 2025 09:30:05 GMT, Thiago Milczarek Sayao wrote: >> This is a continuation to >> [JDK-8236651](https://bugs.openjdk.org/browse/JDK-8236651) and it aims to >> stabilize the linux glass gtk backend. >> >> >> Overall, it has been made more robust within its scope, particularly in

Re: RFR: 8354943: [Linux] Simplify and update glass gtk backend: window sizing, positioning, and state management issues [v16]

2025-05-07 Thread Kevin Rushforth
On Tue, 6 May 2025 12:24:04 GMT, Thiago Milczarek Sayao wrote: >> Thiago Milczarek Sayao has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Fix TestStage conflicting value listener > > There is a test that is failing on `StageOwnershipTest

Re: RFR: 8350316: Create implementation of NSAccessibilityProgressIndicator protocol [v2]

2025-05-07 Thread Andy Goryachev
On Wed, 7 May 2025 15:42:03 GMT, Alexander Zuev wrote: >> Initial implementation. In order to implement progress indicator the group >> accessibility protocol has to be implemented too so this is also a fix for >> 8351773. There are commented out sections that can be used to verify the >> func

Re: RFR: 8313424: JavaFX controls in the title bar (Preview) [v73]

2025-05-07 Thread Michael Strauß
> Implementation of > [`StageStyle.EXTENDED`](https://gist.github.com/mstr2/0befc541ee7297b6db2865cc5e4dbd09). Michael Strauß has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 94 commits: - Merge branch 'master' into feature/extended-

Re: CodeArea: how to convert offset to TextPos?

2025-05-07 Thread Andy Goryachev
There is no dedicated method to do that. The application can iterate over paragraphs to compute the text position, just keep in mind that the model can be quite large and it a) will take a lot of iterations and b) the result may exceed 2^31 (i.e. need to be 'long'). The same is true for the re

Re: RFR: 8354631: [macos] JFX - java.awt.desktop.OpenURIHandler is not receiving events [v2]

2025-05-07 Thread Pabulaner IV
> When trying to register an open URI handler when using JavaFX with a native > menu, this task fails on Mac. > Either the native menu is not shown or the URIs are not received. > > This pull request fixes this issue if AWT is registered after JavaFX, so that > AWT runs embedded inside JavaFX. >

Re: RFR: 8354631: [macos] OpenURIHandler events not received by AWT when JavaFX is primary toolkit [v2]

2025-05-07 Thread Pabulaner IV
On Wed, 7 May 2025 16:41:37 GMT, Pabulaner IV wrote: >> When trying to register an open URI handler when using JavaFX with a native >> menu, this task fails on Mac. >> Either the native menu is not shown or the URIs are not received. >> >> This pull request fixes this issue if AWT is registered

CodeArea: how to convert offset to TextPos?

2025-05-07 Thread PavelTurk
Could anyone say how to convert offset to TextPos in CodeArea? For example, in RTFX CodeArea we have: var pos = codeArea.offsetToPosition(offset, Bias.Backward); var paragraph = pos.getMajor(); Best regards, Pavel

Re: RFR: 8355012: JavaFX modena.css -fx-highlight-text-fill bug [v4]

2025-05-07 Thread Kevin Rushforth
On Mon, 5 May 2025 21:28:08 GMT, Ziad El Midaoui wrote: >> The issue was happening because `-fx-highlight-text-fill` was set to white , >> so when the background color is bright (>60% brightness ) the text is not >> visible , the solution is to change the value to be dynamically set >> dependi

Re: CodeArea: how to get the indexes of the first visible paragraph and the last one?

2025-05-07 Thread Andy Goryachev
RichTextArea.getTextPosition() should be able to give the answer. -andy From: openjfx-dev on behalf of PavelTurk Date: Wednesday, May 7, 2025 at 08:52 To: openjfx-dev@openjdk.org Subject: CodeArea: how to get the indexes of the first visible paragraph and the last one? Could anyone say how t

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

2025-05-07 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

CodeArea: how to get the indexes of the first visible paragraph and the last one?

2025-05-07 Thread PavelTurk
Could anyone say how to get the indexes of the first visible paragraph and the last visible paragraph. If it currently possible. I am talking about indexes relative to all paragraphs in the code area. Best regards, Pavel

Re: RFR: 8350316: Create implementation of NSAccessibilityProgressIndicator protocol [v2]

2025-05-07 Thread Andy Goryachev
On Wed, 7 May 2025 15:42:03 GMT, Alexander Zuev wrote: >> Initial implementation. In order to implement progress indicator the group >> accessibility protocol has to be implemented too so this is also a fix for >> 8351773. There are commented out sections that can be used to verify the >> func

Re: RFR: 8354943: [Linux] Simplify and update glass gtk backend: window sizing, positioning, and state management issues [v18]

2025-05-07 Thread Lukasz Kostyra
On Wed, 7 May 2025 09:30:05 GMT, Thiago Milczarek Sayao wrote: >> This is a continuation to >> [JDK-8236651](https://bugs.openjdk.org/browse/JDK-8236651) and it aims to >> stabilize the linux glass gtk backend. >> >> >> Overall, it has been made more robust within its scope, particularly in

Re: RFR: 8350316: Create implementation of NSAccessibilityProgressIndicator protocol [v2]

2025-05-07 Thread Alexander Zuev
> Initial implementation. In order to implement progress indicator the group > accessibility protocol has to be implemented too so this is also a fix for > 8351773. There are commented out sections that can be used to verify the > functionality of the code since it has to behave exactly in the s

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

2025-05-07 Thread Ziad El Midaoui
On Wed, 19 Feb 2025 16:45:54 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

2025-05-07 Thread Andy Goryachev
On Wed, 19 Feb 2025 16:45:54 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

RFR: 8340344: The first item in TreeView is not aligned in the beginning

2025-05-07 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. - Commit messages: - Fixed import error -

Re: RFR: 8355012: JavaFX modena.css -fx-highlight-text-fill bug [v4]

2025-05-07 Thread Andy Goryachev
On Mon, 5 May 2025 21:28:08 GMT, Ziad El Midaoui wrote: >> The issue was happening because `-fx-highlight-text-fill` was set to white , >> so when the background color is bright (>60% brightness ) the text is not >> visible , the solution is to change the value to be dynamically set >> dependi

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

2025-05-07 Thread Andy Goryachev
On Wed, 7 May 2025 15:09:18 GMT, Kevin Rushforth wrote: >> yes it can: >> >> --add-opens javafx.graphics/com.sun.javafx.application.preferences=andy_test >> >> >> >> var platformPreferences = Platform.getPreferences(); >> var colorSchemeProperty = platformPreferences.colorSche

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

2025-05-07 Thread Andy Goryachev
On Wed, 7 May 2025 15:16:15 GMT, Kevin Rushforth wrote: >> okay > > 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 >

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

2025-05-07 Thread Kevin Rushforth
On Wed, 7 May 2025 15:11:58 GMT, Andy Goryachev wrote: >>> --add-opens javafx.graphics/com.sun.javafx.application.preferences=andy_test >> >> You can access any number of internal classes or methods with >> "--add-exports" or "--add-opens", so that is not a valid argument. > > okay Further, if

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

2025-05-07 Thread Kevin Rushforth
On Wed, 7 May 2025 14:55:08 GMT, Andy Goryachev wrote: > --add-opens javafx.graphics/com.sun.javafx.application.preferences=andy_test You can access any number of internal classes or methods with "--add-exports" or "--add-opens", so that is not a valid argument. - PR Review Commen

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

2025-05-07 Thread Kevin Rushforth
On Wed, 7 May 2025 13:26:01 GMT, John Hendrikx wrote: >>> I think it (creating things in a background thread) was a mistake in the >>> first place, but there seems to be zero desire to change it >> >> Your objection is noted, but we are not going to relitigate this. JavaFX >> explicitly allows

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

2025-05-07 Thread Andy Goryachev
On Wed, 7 May 2025 14:51:11 GMT, Kevin Rushforth wrote: >> No, an application would not be able to do that. A getter whose >> implementation happens to return a subtype in a non-exported package does >> not allow the caller of that getter to access any methods in the >> non-exported class (eve

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

2025-05-07 Thread Kevin Rushforth
On Wed, 7 May 2025 14:44:02 GMT, Kevin Rushforth wrote: >> let me try again: >> >> `Platform.getPreferences()` returns an instance of `PlatformPreferences` >> `PlatformPreferences.colorSchemeProperty()` returns a `ColorSchemeProperty` >> with a public `updateEffectiveValue()` >> >> the app can

Integrated: 8355012: JavaFX modena.css -fx-highlight-text-fill bug

2025-05-07 Thread Ziad El Midaoui
On Thu, 1 May 2025 22:08:46 GMT, Ziad El Midaoui wrote: > The issue was happening because `-fx-highlight-text-fill` was set to white , > so when the background color is bright (>60% brightness ) the text is not > visible , the solution is to change the value to be dynamically set depending > o

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

2025-05-07 Thread Kevin Rushforth
On Wed, 7 May 2025 14:35:34 GMT, Andy Goryachev wrote: >> No, the instance of `PreferenceProperties` is only stored as a private field >> in `PlatformPreferences`. I'm usually using public methods in nested classes >> to indicate that the method is supposed to be called from outside of the >>

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

2025-05-07 Thread Andy Goryachev
On Wed, 7 May 2025 09:28:53 GMT, Michael Strauß wrote: >> modules/javafx.graphics/src/main/java/com/sun/javafx/application/preferences/PreferenceProperties.java >> line 258: >> >>> 256: } >>> 257: >>> 258: // This method must only be called on the FX application >>> thread. >>

Re: RFR: 8355012: JavaFX modena.css -fx-highlight-text-fill bug [v4]

2025-05-07 Thread duke
On Mon, 5 May 2025 21:28:08 GMT, Ziad El Midaoui wrote: >> The issue was happening because `-fx-highlight-text-fill` was set to white , >> so when the background color is bright (>60% brightness ) the text is not >> visible , the solution is to change the value to be dynamically set >> dependi

Re: RFR: 8355012: JavaFX modena.css -fx-highlight-text-fill bug [v4]

2025-05-07 Thread Ziad El Midaoui
On Mon, 5 May 2025 21:28:08 GMT, Ziad El Midaoui wrote: >> The issue was happening because `-fx-highlight-text-fill` was set to white , >> so when the background color is bright (>60% brightness ) the text is not >> visible , the solution is to change the value to be dynamically set >> dependi

Re: RFR: 8354943: [Linux] Simplify and update glass gtk backend: window sizing, positioning, and state management issues [v18]

2025-05-07 Thread Lukasz Kostyra
On Wed, 7 May 2025 09:30:05 GMT, Thiago Milczarek Sayao wrote: >> This is a continuation to >> [JDK-8236651](https://bugs.openjdk.org/browse/JDK-8236651) and it aims to >> stabilize the linux glass gtk backend. >> >> >> Overall, it has been made more robust within its scope, particularly in

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

2025-05-07 Thread John Hendrikx
On Wed, 7 May 2025 13:06:50 GMT, Kevin Rushforth wrote: >> `NullCoalescingPropertyBase` (used in `ScenePreferences`) is initially >> disconnected. It will set its initial value to the value is reads from >> `PlatformPreferences`, but it will not subscribe to change notifications. >> The reason

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

2025-05-07 Thread Kevin Rushforth
On Wed, 7 May 2025 09:16:02 GMT, Michael Strauß wrote: >> PlatformPreferences.update() seems to be called only from the fx thread, if >> I read the code right. What happens when the Scene is created in a bg >> thread and a listener added to its preferences, and an event is fired? Will >> the

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

2025-05-07 Thread Michael Strauß
On Tue, 6 May 2025 14:55:53 GMT, Andy Goryachev wrote: >> Michael Strauß has updated the pull request incrementally with one >> additional commit since the last revision: >> >> improve synchronization in PreferenceProperties > > modules/javafx.graphics/src/main/java/com/sun/javafx/application

Re: RFR: 8354943: [Linux] Simplify and update glass gtk backend: window sizing, positioning, and state management issues [v18]

2025-05-07 Thread Thiago Milczarek Sayao
> This is a continuation to > [JDK-8236651](https://bugs.openjdk.org/browse/JDK-8236651) and it aims to > stabilize the linux glass gtk backend. > > > Overall, it has been made more robust within its scope, particularly in terms > of sizing, positioning, and state management. > > List of chan

Re: RFR: 8354943: [Linux] Simplify and update glass gtk backend: window sizing, positioning, and state management issues [v17]

2025-05-07 Thread Thiago Milczarek Sayao
On Wed, 7 May 2025 06:08:46 GMT, Lukasz Kostyra wrote: >> Thiago Milczarek Sayao has updated the pull request incrementally with one >> additional commit since the last revision: >> >> Review fixes > > modules/javafx.graphics/src/main/native-glass/gtk/glass_general.h line 244: > >> 242: >>

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

2025-05-07 Thread Michael Strauß
On Tue, 6 May 2025 15:08:53 GMT, Andy Goryachev wrote: >> Michael Strauß has updated the pull request incrementally with one >> additional commit since the last revision: >> >> improve synchronization in PreferenceProperties > > modules/javafx.graphics/src/main/java/com/sun/javafx/application

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

2025-05-07 Thread Michael Strauß
On Tue, 6 May 2025 15:55:31 GMT, Andy Goryachev wrote: >> so an array with the same values produces a different hash code. >> in reality, it's highly unlikely. >> >> However, `FunctionExpression` is a `record`. What's the point of declaring >> it a record when you override `hashCode` and `equa

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

2025-05-07 Thread Michael Strauß
On Tue, 6 May 2025 21:03:14 GMT, Andy Goryachev wrote: >> 1. That's how it is implemented. No change events before the scene is shown >> (only initial values are read). >> 2. Now this would be a direct contradiction of the specification, which >> would make the user model much harder. Suddenly