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

Improve SplitPaneState #3974

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

vdshb
Copy link

@vdshb vdshb commented Nov 25, 2023

Improve SplitPane programmatic configuration through changes in SplitPaneState.
Add programmatic SplitPane programmatic configuration changes to demo.

@vdshb
Copy link
Author

vdshb commented Dec 19, 2023

BTW, I'm not slightly insist on changing the demo-app. I just thought this change might be benificial. It might be easily reverted.

@vdshb
Copy link
Author

vdshb commented Apr 22, 2024

@m-sasha , could you please review this PR?

@vdshb
Copy link
Author

vdshb commented Apr 29, 2024

@m-sasha , @MatkovIvan What can I do to clarify the state of this PR? It's pretty small (tiny if you are not interested in demo-app changes), but it's ignored for quiet a while.

@m-sasha
Copy link
Contributor

m-sasha commented Apr 30, 2024

Making moveEnabled settable makes sense, but I'm not sure what the change to positionPercentage is trying to achieve.
Also, I don't like the code duplication in the positionPercentage setter and dispatchRawMovement.

@vdshb
Copy link
Author

vdshb commented May 6, 2024

I'm not sure what the change to positionPercentage is trying to achieve.

Effectively it's making positionPercentage settable as well. I've just overcomplicated it initially.

You can revert SplitPaneState and see, that new functions in changed demo-app (Set fraction V and Set fraction H) are not working without it.

I personally use it to save state of multiple SplitPanes on application close, to restore them on fresh application start.

Also, I don't like the code duplication in the positionPercentage setter and dispatchRawMovement.

Fair. It was my initial laziness to investigate how positionPercentage and dispatchRawMovement really work. I've changed it. It is much simpler now.

@vdshb
Copy link
Author

vdshb commented May 17, 2024

@m-sasha, any feedback?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants