RFR: 8354795: DialogPane show details button wipes out base style class "hyperlink"

Andy Goryachev angorya at openjdk.org
Thu Apr 17 21:21:55 UTC 2025


On Thu, 17 Apr 2025 20:44:57 GMT, Michael Strauß <mstrauss at openjdk.org> wrote:

> If you use a `Hyperlink` control, you also want the result to be hyperlinky and inherit all the hyperlinky styles

not necessarily, if you want all the functionality but different visuals.

BTW, the circular button in the DialogPane looks nothing like other modena buttons.  I suspect the code was transplanted from some other project.  May be the DialogPane should have used the TitledPane for the expandable content, to be visually consistent with the rest of javaFX?

In any case, I think it is wrong to retain the hyperlink style in this case.  What I agree with is that it should not use `setAll()` to wipe out the existing styles, because the `createDetailsButton()` is a protected method and the application can override it to set some other base style.

So my suggestion would be:
- remove the `hyperlink` style
- set `details-button` style
- add/remove `less`/`more` styles as proposed in this PR

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

PR Comment: https://git.openjdk.org/jfx/pull/1779#issuecomment-2814045926


More information about the openjfx-dev mailing list