We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
The embedded paned layout gets broken when the layout is rebuilt.
Let's have a paned layout that includes another paned layout, something like this:
^ SpPanedLayout newHorizontal add: (SpPanedLayout newHorizontal add: #button1; add: #button2; positionOfSlider: 0.5; yourself); add: #button3; positionOfSlider: 0.5; yourself
Then the output window will look like this:
Now let's update the layout without changing of the definition:
updateLayout layout := self class defaultLayout.
It makes tha layout with wrong ratios:
But even small resizing of the window makes it reasonable again:
The testing code:
PanedLayoutIssue.zip
The text was updated successfully, but these errors were encountered:
It does not break this way if the layout uses only one non-embedded paned layout
defaultLayout ^ SpPanedLayout newHorizontal add: #button2; add: #button3; yourself
However, the resizing of the window resets the user-set splitter position
Sorry, something went wrong.
for this particular case, the hackinsh preserving of the old position does the job but we need more general way of doing this
GtkPanedAdapter>>#replaceLayoutWith: replaceLayoutWith: aLayout GRunLoop defer: [ | oldAdapter oldPosition | oldAdapter := self presenter adapter. oldPosition := (self presenter adapter widget isKindOf: GtkPaned) ifTrue: [ self presenter adapter widget position ] ifFalse: [ nil ]. self presenter adapter: (aLayout buildAdapterFor: self presenter bindings: self presenter application adapterBindings). oldAdapter cleanupAfterReplacing. self presenter owner adapter rebuild. oldPosition ifNotNil: [ aLayout adapter widget position: oldPosition ] ]
No branches or pull requests
The embedded paned layout gets broken when the layout is rebuilt.
Let's have a paned layout that includes another paned layout, something like this:
Then the output window will look like this:
Now let's update the layout without changing of the definition:
It makes tha layout with wrong ratios:
But even small resizing of the window makes it reasonable again:
The testing code:
PanedLayoutIssue.zip
The text was updated successfully, but these errors were encountered: