RFR: 8354795: DialogPane show details button wipes out base style class "hyperlink"
John Hendrikx
jhendrikx at openjdk.org
Fri Apr 18 09:29:49 UTC 2025
On Thu, 17 Apr 2025 21:19:09 GMT, Andy Goryachev <angorya 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
So... you want me to add more styles so it then ends up looking like a correctly colored hyperlink?
Wouldn't it be easier to do this the other way around, leave the hyperlink style, then apply any specific styling that is needed to make a details-button?
-------------
PR Comment: https://git.openjdk.org/jfx/pull/1779#issuecomment-2815067847
More information about the openjfx-dev
mailing list