-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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 doesn't respect clipping #3207
Closed
rock3r opened this issue
May 25, 2023
· 3 comments
· Fixed by JetBrains/compose-multiplatform-core#1147
Closed
SwingPanel doesn't respect clipping #3207
rock3r opened this issue
May 25, 2023
· 3 comments
· Fixed by JetBrains/compose-multiplatform-core#1147
Labels
Comments
Should be mitigated by JetBrains/compose-multiplatform-core#915 |
Actually, it works even without JetBrains/compose-multiplatform-core#915 The most likely fix is JetBrains/compose-multiplatform-core#922 (not sure, there are a few changes there). Anyway, it should work in 1.6.0. Please let me know if it doesn't |
Ah. It sets bounds instead of actual clipping now. Reopening Screen.Recording.2024-02-27.at.18.50.08.mov |
MatkovIvan
added a commit
to JetBrains/compose-multiplatform-core
that referenced
this issue
Feb 29, 2024
## Proposed Changes - Fix setting bounds - currently it relys on clipped size - Use clipped bounds for actual clipping, but not clipped for interop layout - Based on #1145 ## Testing Test: try to use `SwingPanel` inside scroll ```kt Column(Modifier.size(250.dp).verticalScroll(rememberScrollState())) { repeat(10) { SwingPanel( factory = { JButton() }, modifier = Modifier.size(100.dp) ) } } ```` Before: https://github.com/JetBrains/compose-multiplatform-core/assets/1836384/362198c2-f8fa-4004-881b-5a7a6867f0c0 After: https://github.com/JetBrains/compose-multiplatform-core/assets/1836384/546968e6-dcff-4f70-9935-0465dcb2a6e4 ## Issues Fixed Fixes JetBrains/compose-multiplatform#3207
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Describe the bug
SwingPanel contents don't respect clipping set on themselves nor their parents. This is especially problematic when used in a scrollable container that has other composable around it along the scroll axis.
Affected platforms
Versions
To Reproduce
Expected behavior
Clipping should always be respected
The text was updated successfully, but these errors were encountered: