Improve the looks of 2D/3D viewport contextual toolbars #81557
Merged
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.
Fixing two annoyances about contextual toolbars:
To address the first one I've added expand margins to all sides. I also replaced a control that was used to add extra left padding to the whole toolbar row with a margin container, so this extra padding is added to rows wrapped by the
FlowContainer
.To address the second I've added some extra logic to dynamically add separators when we add controls to the toolbar. These automatic separators correctly react to their owner node being hidden and shown too. To make this work, I had to remove hardcoded separators from all custom toolbars, and in some cases rework the layout a bit (for the better).
This does mean that if any user plugins have hardcoded
VSeparator
, it will look meh, because one would be added by us anyway. But to fix this they would simply need to remove their extra node, et voila, a consistent and neat look!Some before-and-afters