This repository was archived by the owner on Nov 6, 2019. It is now read-only.
Merged
Conversation
Member
|
This is conceptually easy to understand; I think the confusion over what |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Not ready for merge. For discussion.
This PR is intending to remove the automatically computed maximum size from the absolute layouts (the automatic min size will remain). The existing behavior with max size seems to have caused confusion among new users who expect to be able to set the max size of a panel in CSS and have that be obeyed, rather than be overridden by the layout.
The current behavior will also present a problem for a "document mode" in the dock panel where the width of the single document may be constrained but the dock panel itself should still be free to expand.
By allowing the panels to expand beyond the maximum space which can be filled by the children, we now need a way to deal with that extra space and allow the children to be aligned within it. To that end, this PR adds a new
LayoutItemclass which helps with handling this alignment, along with updating the absolute layouts as appropriate.Of note is that if the children can be expanded to fit the available layout space, they will be, and the alignment values will have no effect. The only time alignment comes into play is if there is more available space than can be filled by the layout children.
This PR will also obviate the need of the following methods, which will be removed:
Widget.prepareGeometry,Widget.setGeometry,Widget.resetGeometry.The gif below demonstrates the new alignment functionality with a box panel. Watch the console for the parameters being toggled.
cc @afshin @blink1073 @ellisonbg @jasongrout