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

Enhancement: Improve codeviewer example: No protrude splittable both side . #148

Open
MulticolorWorld opened this issue Nov 28, 2020 · 7 comments
Assignees
Labels
desktop enhancement New feature or request examples Example applications

Comments

@MulticolorWorld
Copy link

In the "vertical splitter" example currently used in codeviewer, the left side does not protrude due to the minimum size specification, but the right side has no limit and will protrude outside the window.
I'd like to improve this, but I'm wondering if you have any good examples.

Sorry Im poor English end use machine translation sorry.

@MulticolorWorld
Copy link
Author

If this is not appropriate here, I would be grateful if you could guide me to the right place.

@igordmn igordmn self-assigned this Nov 29, 2020
@igordmn igordmn added the enhancement New feature or request label Nov 29, 2020
@MulticolorWorld
Copy link
Author

MulticolorWorld commented Nov 29, 2020

How to get parent size or splittable itself in composable function? If exist, coerceAtMost() is work it.

igordmn added a commit that referenced this issue Nov 29, 2020
@igordmn
Copy link
Collaborator

igordmn commented Nov 29, 2020

You can look at this:
9e67cfc

But it is not finished. If we resize the main window then we will see a small lag (size of the panel will not be immediately changed)

@MulticolorWorld
Copy link
Author

MulticolorWorld commented Nov 29, 2020

Getting size of composable itself to use onSizeChanged() and size-state is workaround? Allow to use it normally?

@igordmn
Copy link
Collaborator

igordmn commented Nov 29, 2020

Getting size of composable itself to use onSizeChanged() and size-state is workaround? Allow to use it normally?

Probably the lag when we resize the main window caused by onSizeChanged (because the panel will be resized only on the second frame).

Probably we need to constrain sizes of panels not inside onSizeChanged, but inside VerticalSplittable function

@MulticolorWorld
Copy link
Author

Oh, sorry. Apart from this issue, I wanted to ask if this usage is normal. Probably because there are going to be many situations where you want to know the size of itself.

@igordmn
Copy link
Collaborator

igordmn commented Nov 29, 2020

I wanted to ask if this usage is normal

Probably in most cases we should use Layout or WithConstraints

Because we will know the size of the container immediately (in the current frame).

But in the case it is not important to know the size in the current frame, we can use onSizeChanged and size-state.

@igordmn igordmn added the examples Example applications label Dec 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
desktop enhancement New feature or request examples Example applications
Projects
None yet
Development

No branches or pull requests

3 participants