You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When a tooltip is displayed over a heavyweight component the shadow is on a white background rather than transparent.
If the tooltip is partly outside the bounds of the main window, it is rendered as expected.
I suspect this is due to the fact that the PopupFactory is not forcing a heavyweight component when the popup will be displayed over a heavyweight component. This is probably a general issue in Swing but it is not seen there since the default tool tip popup doesn't have a drop shadow. Since FlatLaf returns a DropShadowPopup it becomes an issue.
I understand I can disable the drop shadow (via "Popup.dropShadowPainted") or force heavy weight popups (via "Popup.forceHeavyWeight"), but it would be nice if this worked out of the box. Perhaps force a heavy weight popup if there are heavyweight components at the extents of the tool tip?
Here's the source to reproduce. This seems to be an issue on Windows, but not Linux (didn't try Mac).
At the moment I would recommend to force heavyweight popups for your application:
UIManager.put( "Popup.forceHeavyWeight", true );
Lightweight popups are only used on Windows and only if the popup fits into the window.
On macOS and on Linux, always heavyweight popups are used because they provide operating system border and drop shadow.
...but it would be nice if this worked out of the box. Perhaps force a heavy weight popup if there are heavyweight components at the extents of the tool tip?
I'll try this...
BTW working a way to use popups with native borders and drop shadow on Windows 11:
Then also heavyweight popup will be used on Windows 11.
Only Window 10 will use lightweight popups.
When a tooltip is displayed over a heavyweight component the shadow is on a white background rather than transparent.
If the tooltip is partly outside the bounds of the main window, it is rendered as expected.
I suspect this is due to the fact that the
PopupFactory
is not forcing a heavyweight component when the popup will be displayed over a heavyweight component. This is probably a general issue in Swing but it is not seen there since the default tool tip popup doesn't have a drop shadow. Since FlatLaf returns aDropShadowPopup
it becomes an issue.I understand I can disable the drop shadow (via "Popup.dropShadowPainted") or force heavy weight popups (via "Popup.forceHeavyWeight"), but it would be nice if this worked out of the box. Perhaps force a heavy weight popup if there are heavyweight components at the extents of the tool tip?
Here's the source to reproduce. This seems to be an issue on Windows, but not Linux (didn't try Mac).
The text was updated successfully, but these errors were encountered: