On Thu, 11 Apr 2024 20:23:52 GMT, Andy Goryachev <ango...@openjdk.org> wrote:

>> Marius Hanl has updated the pull request incrementally with one additional 
>> commit since the last revision:
>> 
>>   Allow Tooltip to process the owner styles first so that also global 
>> stylesheets are considered for the e.g. tooltip show-delay
>
> modules/javafx.controls/src/main/java/javafx/scene/control/Tooltip.java line 
> 177:
> 
>> 175:     protected void show() {
>> 176:         // The very first show call is just for us to do the correct 
>> CSS processing, so we ignore the request here.
>> 177:         if (!cssForced) {
> 
> I am *very* suspicious of this change.  Yes, it sort of works, but I wonder 
> if it might backfire as it breaks the contract of show() and also depends on 
> some assumptions ("The very first show call is just for us to do the correct 
> CSS processing").
> 
> Would it be possible to try the applySceneStylesFromOwner() approach, maybe 
> by moving the method to Utils to avoid changing the API?  This issue does not 
> seem to be limited to Tooltip - there is a similar code in 
> CustomColorDialog:88 for example.
> 
> What do you think?

As written above, that would also be a possibility I explorer and that worked 
as well. Would be fine for me and I agree that this is rather unexpected. I 
will explore the other solution soon, when time permits.

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

PR Review Comment: https://git.openjdk.org/jfx/pull/1394#discussion_r1562296242

Reply via email to