Repository navigation
Apply split percentage once size is known - #49
Merged
sylvestre merged 1 commit intoNov 24, 2026
Merged
Conversation
|
This pull request is merged. |
Contributor
Author
|
@sylvestre This is the last "urgent" fix I wanted to make. Handling of corner cases is much more robust now: in my FlexDock-based project I used to see exceptions, unexpected size changes and even lost layout files, but not anymore. After the remaining PRs are merged, I'd propose bumping the version to v1.4 and doing a proper release. I can prepare a PR that bumps the poms and dates the release notes; the tag and publishing would be up to you. Since a few public APIs were removed and the minimum Java version changed, v2.0 would also be defensible, so I'm happy to go with whichever you prefer. |
sylvestre
reviewed
Nov 22, 2026
danilovesky
force-pushed
the
fix-split-proportion-on-import
branch
from
November 23, 2026 09:19
8ef313b to
e7050e7
Compare
sylvestre
reviewed
Nov 23, 2026
Without constant percent, JSplitPane converted the percentage to pixels from the zero size of a split that was not laid out yet, so a stored proportion was lost on importLayout (0.5 below 1/3, preferred sizes from 1/3 on). Keep the percentage and apply it in setBounds() once the size is known, as constant-percent mode does. An explicit pixel location set in the meantime replaces the waiting percentage. Fixes opencollab#33
danilovesky
force-pushed
the
fix-split-proportion-on-import
branch
from
November 23, 2026 19:26
e7050e7 to
19f2c9f
Compare
Contributor
|
Thanks for your PR |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Without constant percent, a split proportion set before the split pane has a size was lost (stored layouts came back at 0.5 or Swing's preferred sizes).
DockingSplitPanenow keeps the percentage and applies it insetBounds()once the size is known, as constant-percent mode already does.Fixes #33