Improve SplitPaneState
Improve SplitPane programmatic configuration through changes in SplitPaneState.
Add programmatic SplitPane programmatic configuration changes to demo.
BTW, I'm not slightly insist on changing the demo-app. I just thought this change might be benificial. It might be easily reverted.
@m-sasha , could you please review this PR?
@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.
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.
I'm not sure what the change to
positionPercentageis 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
positionPercentagesetter anddispatchRawMovement.
Fair. It was my initial laziness to investigate how positionPercentage and dispatchRawMovement really work. I've changed it. It is much simpler now.
@m-sasha, any feedback?
@m-sasha, @MatkovIvan What can I do to make this PR closer to merge? It's become pretty simple and even smaller since the last change.
Sorry, I've just been busy with more urgent issues recently. I'll try to give it another look soon.
Thanks for eventually merged improvement!