dont use widgets for padding in flex#1584
Merged
cmyr merged 19 commits intolinebender:masterfrom Feb 18, 2021
Merged
Conversation
cmyr
approved these changes
Feb 17, 2021
Member
cmyr
left a comment
There was a problem hiding this comment.
Okay, this looks good. I was a little concerned it would be harder to understand, but I don't really think that's the case.
I have a few notes inline, but nothing blocking, will give you a chance to address what you want and then merge.
Thanks!
cmyr
reviewed
Feb 18, 2021
cmyr
reviewed
Feb 18, 2021
Member
cmyr
left a comment
There was a problem hiding this comment.
Was initially going to just make some notes and merge this but I think you can clean it up by quite a bit by using flat_map instead of map, and by using more concise destructuring syntax.
Sorry for the nits, will be nice to have this all cleaned up though. :)
Co-authored-by: Colin Rofls <colin@cmyr.net>
Co-authored-by: Colin Rofls <colin@cmyr.net>
Co-authored-by: Colin Rofls <colin@cmyr.net>
cmyr
reviewed
Feb 18, 2021
richard-uk1
pushed a commit
to richard-uk1/druid
that referenced
this pull request
Apr 6, 2021
* move spacers away from being widget backed
* small cleanup
* other implementation
* fix??
* small performance improvements
* undo changes in example
* undo changes in example
* undo changes in example
* fmt
* add changelog
* mode to struct fields and add `.widget{_mut}` method on flex children
* fmt
* _even better_ nice looking stuff
* Update druid/src/widget/flex.rs
Co-authored-by: Colin Rofls <colin@cmyr.net>
* Update druid/src/widget/flex.rs
Co-authored-by: Colin Rofls <colin@cmyr.net>
* Update druid/src/widget/flex.rs
Co-authored-by: Colin Rofls <colin@cmyr.net>
* Apply suggestions from code review
Co-authored-by: Colin Rofls <colin@cmyr.net>
xarvic
pushed a commit
to xarvic/druid
that referenced
this pull request
Apr 7, 2021
* move spacers away from being widget backed
* small cleanup
* other implementation
* fix??
* small performance improvements
* undo changes in example
* undo changes in example
* undo changes in example
* fmt
* add changelog
* mode to struct fields and add `.widget{_mut}` method on flex children
* fmt
* _even better_ nice looking stuff
* Update druid/src/widget/flex.rs
Co-authored-by: Colin Rofls <colin@cmyr.net>
* Update druid/src/widget/flex.rs
Co-authored-by: Colin Rofls <colin@cmyr.net>
* Update druid/src/widget/flex.rs
Co-authored-by: Colin Rofls <colin@cmyr.net>
* Apply suggestions from code review
Co-authored-by: Colin Rofls <colin@cmyr.net>
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.
Having a special purpose widget just for padding in flexes is a bit too flexible ( ;) ), and not needed. It really doesnt need to be a widget, if we just store the amount of padding (px/flex) we can easily calculate its width and layout.
fixes #1566