Skip to content
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

Fix clipping bounds of SwingPanel #1147

Merged
merged 3 commits into from Feb 29, 2024
Merged

Conversation

MatkovIvan
Copy link
Member

Proposed Changes

Testing

Test: try to use SwingPanel inside scroll

Column(Modifier.size(250.dp).verticalScroll(rememberScrollState())) {
    repeat(10) {
        SwingPanel(
            factory = { JButton() },
            modifier = Modifier.size(100.dp)
        )
    }
}

Before:

clip_before.mp4

After:

clip_after.mp4

Issues Fixed

Fixes JetBrains/compose-multiplatform#3207

@MatkovIvan MatkovIvan force-pushed the ivan.matkov/interop-render-order branch from 0c61457 to e1e6886 Compare February 28, 2024 12:28
@MatkovIvan MatkovIvan force-pushed the ivan.matkov/interop-clipping branch 2 times, most recently from 20762f2 to 0d5d784 Compare February 29, 2024 15:24
Base automatically changed from ivan.matkov/interop-render-order to jb-main February 29, 2024 23:01
@MatkovIvan MatkovIvan merged commit 6b1cbe1 into jb-main Feb 29, 2024
2 checks passed
@MatkovIvan MatkovIvan deleted the ivan.matkov/interop-clipping branch February 29, 2024 23:05
MatkovIvan added a commit that referenced this pull request Mar 1, 2024
## Proposed Changes

Additional fix for #1145 and #1147

- Re-validate interop container after resizing component
- Fix incorrect calls - `componentResized` -> `onChangeWindowSize` and
`componentMoved` -> `onChangeWindowPosition`

## Testing

Test: Resize a window on "InteropOrder" mpp page (reproduced on macOS)

## Issues Fixed

Fixes
#1145 (comment)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants