Refactor sizing logic#70
Draft
SKProCH wants to merge 1 commit into
Draft
Conversation
Owner
Author
|
Current sizing:
To implement:
|
Collaborator
|
This PR still have small fixes that should be merged |
Owner
Author
|
What did you mean? |
Collaborator
Owner
Author
|
Done |
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.



After 3.0.0 i think that we actually need to change our sizing logic.
Two main goals:
Allow users to restore 2.x.x behavior (probably on demaid)
Fix various sizing bugs:
IconSize wrong sizing #66
2.4.x -> 3.0.0 icons is bigger #68 (comment)
This PR changes the measure logic (for now).
Main point: add Stretch and StretchDirection property to allow direct viewbox behavior customizing from user perspective.
Also, return explicit 24/24 size to Path in layout, since all icons (at least if i get it correctly, designed with 24px in mind. If there was an empty space - it should be kept as is)
Defaults:
Stretch - Uniform (preserves aspect ratio)
StretchDirection - DownOnly
I've setup a basic constraints (NEED TO DISCUSS, open to suggestions) (path == viewbox):
this is done to keep sane FontSize behavior
(cuz we sizing icon according to the FontSize, and user sets the Padding, i guess user wants padding be not shrink the icon)
^ NEEDS DISCUSSION
^ NEEDS DISCUSSION
@sn4k3