Merged
Conversation
- Changed the display order to use sibling ZIndex instead of a global ZIndex ordering. - Added new ZOffset and ZUpdate parent widget properties which decide the LayoutOrder of children. - Widgets will use a LayoutOrder relative to siblings only. This allows for dynamic reorganising of widgets. - Widgets will check that their ZIndex matches an expected value, otherwise causing a reshuffling of widgets. - Removed unnecessary ZIndex and LayoutOrder assignments for all widgets.
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.
Simple Fix to Widget Layout Issues
Although this was addressed in #46, I was unsatisfied with regenerating widgets because they became out of order. Instead, I decided to redesign the layout system so that it is trivial to change the order of sibling elements without affecting children or parents. This involves a counter within each parent widget which assigns the LayoutOrder property and can check for new widgets added.
The current way to check for a new widget is by comparing the widget ZIndex property against the parent's counter. This ensures that if the widget order changes, all that needs to be done is change the Instance LayoutOrder property, no regeneration required.
Additions
Tweaks and fixes