On Wed, 27 Jul 2022 20:02:37 GMT, Michael Strauß <[email protected]> wrote:
>> sorry, what check?
>>
>> if you mean
>> if (skin != null) {
>> if(skin.getSkinnable() != Control.this) {
>>
>> we can't because PopupControl violates the 1:1 rule.
>
> Yes, but that can be fixed so the rule is not violated.
I like this idea.
However, I am afraid that the impact of the check in PopupControl might be
greater than expected. In addition to your ComboBoxPopupcontrol.createPopup()
fix you provided earlier, there is a similar situation with TooltipSkin in
PopupcontrolTest:604:
Tooltip tooltip = new Tooltip("Hello");
TooltipSkin skin = new TooltipSkin(tooltip);
popup.setSkin(skin);
it is not entirely clear to me why a TooltipSkin is installed as a skin for the
popup instead of the tooltip.
I think we should rather say that this 1:1 rule does not apply to PopupControls.
-------------
PR: https://git.openjdk.org/jfx/pull/845