On Tue, 17 Nov 2026 05:59:53 GMT, John Hendrikx <[email protected]> wrote:

>> The "show details" hyperlink button in an alert dialog that has an 
>> expandable detail area wipes out its base style class by overwriting all 
>> styles. This means styling in modena.css that targets `.hyperlink` is no 
>> longer applied, like the default text fill colors.
>> 
>> The culprit is this code in DialogPane:
>> 
>>         InvalidationListener expandedListener = o -> {
>>             final boolean isExpanded = isExpanded();
>>             detailsButton.setText(isExpanded ? lessText : moreText);
>>             detailsButton.getStyleClass().setAll("details-button", 
>> (isExpanded ? "less" : "more")); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
>>         };
>> 
>> Here it uses `setAll` to set styles, wiping out the default `.hyperlink` 
>> style from "Hyperlink detailsButton = new HyperLink()"
>> 
>> ---------
>> - [x] I confirm that I make this contribution in accordance with the 
>> [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai).
>
> John Hendrikx has updated the pull request with a new target base due to a 
> merge or a rebase. The pull request now contains three commits:
> 
>  - Updated PR with unrelated changes as requested
>  - merged in master
>  - Fix style classes

The hyperlink metaphor seems wrong to me here, but it seems more people want 
this change.
Thanks for fixing `//$NON-NLS-1$`

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

Marked as reviewed by angorya (Reviewer).

PR Review: https://git.openjdk.org/jfx/pull/1779#pullrequestreview-5945851141

Reply via email to