[Breaking] Celllayout: fit the grid when layouting the root layoutable container #610
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.
With this change, the width of cells with pushX/growX is the maximum of the text width (
preferences->Editor->MPS Editor->text width
) and the widest cell in the editor. The text width was not considered on purpose in the past. That means that, for example, horizontal lines had the width of the widest cell in the editor which doesn't make any sense to me. What's the point of having a maximum width for the editor if it is not always considered in the maximum width calculation? Was there any reason to disable the fitting for the preferred inner size? I couldn't find any examples where this causes layout issues, so I changed it.Before:
After:
The lines might appear a bit long in this example because I have set the text width to 180. With a more standard text width like 100 it looks normal.
You can even restore the old behavior by placing pushX/growX: false commands at specific levels in the editor. In the following example, the content collection of the test suite has the flags set, which makes the red lines the width of the content. The black line after the header has the full editor text width: