-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SwingPanel not clipped by containing widget #1449
Comments
Unfortunately this is how SwingPanel works currently. I added docs about it. We draw all Swing components over all Compose components. To properly fix the issue, we need to draw Swing into texture/bitmap (preferably with hardware acceleration), or map all Swing Graphics2D operations to Skia operations. |
Possibly related to #1202 |
Huh, skijagraphics2d is actually kinda cute/clever - it could also improve the situation for screenshot testing too, which currently crashes if a widget contains a swing subcomponent. I don't think I have the knowledge to recommend one approach or the other, but as @felixdivo observed, many things are going to be broken if clipping and layering are wrong. |
Fixed by JetBrains/compose-multiplatform-core#915 (under the flag) |
Please check the following ticket on YouTrack for follow-ups to this issue. GitHub issues will be closed in the coming weeks. |
Consider the following code:
It should look like this:

But it actually looks like this:

Notice the content of the box is not clipped by the rounded corners of its container card. You can reproduce by commenting out the SwingPanel and notice that the content is clipped by the containing card when there is no SwingPane inside the card.
cc @igordmn
The text was updated successfully, but these errors were encountered: