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

SplitLayout jumps weirdly in the IDE #589

Open
rock3r opened this issue Sep 10, 2024 · 1 comment
Open

SplitLayout jumps weirdly in the IDE #589

rock3r opened this issue Sep 10, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@rock3r
Copy link
Collaborator

rock3r commented Sep 10, 2024

As we were upgrading Jewel in Studio to 0.24.2 with @jrlogsdon, we noticed that the split layout has a bad bug when dragging on the initial state. We can repro this in both Linux and macOS — have not tried Windows, but would assume it's the same. We have not tried repro'ing in standalone.

This code:

Column(
  modifier = Modifier.fillMaxWidth().fillMaxHeight(),
  verticalArrangement = Arrangement.Center,
  horizontalAlignment = Alignment.CenterHorizontally
) {
  HorizontalSplitLayout(
    firstPaneMinWidth = 200.dp,
    secondPaneMinWidth = 250.dp,
    first = { },
    second = { },
    state = rememberSplitLayoutState(.3f)
  )
}

(simplified version of this Studio code)

Has this behaviour when set as content of a toolwindow:

Screen.Recording.2024-09-09.at.18.24.51.mov
@rock3r rock3r added the bug Something isn't working label Sep 10, 2024
@hamen
Copy link
Collaborator

hamen commented Sep 11, 2024

I looked into it, but I can't find a quick solution. I can give you a workaround for now, though:

Add Modifier.fillMaxWidth() to the HorizontalSplitLayout and the measurement glitch should be contained.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants