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

Code and dialog looks good to me.
Just want to recheck. In my opinion, this is fine.
Is there anything we should change as part of the default `Modena` stylesheet, 
or are we fine with the minor change:

| State | Before - After|
| - | - |
| Normal | <img width="300" height="55" alt="image" 
src="https://github.com/user-attachments/assets/3b1697bf-14b0-4176-9e4a-a4c0c9b2210d";
 /> |
| Hover | <img width="300" height="55" alt="image" 
src="https://github.com/user-attachments/assets/c981213a-7684-44ef-87f6-d87874efa6d5";
 /> |
| Visited | <img width="300" height="55" alt="image" 
src="https://github.com/user-attachments/assets/35d5a196-a1a8-4249-a76b-814d2459a09b";
 /> |

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

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

Reply via email to