Fix bugs in contrast guideline and improve heuristic#31000
Merged
jonahwilliams merged 3 commits intoflutter:masterfrom Apr 15, 2019
Merged
Fix bugs in contrast guideline and improve heuristic#31000jonahwilliams merged 3 commits intoflutter:masterfrom
jonahwilliams merged 3 commits intoflutter:masterfrom
Conversation
Contributor
Author
|
cc @johnsonmh |
johnsonmh
approved these changes
Apr 13, 2019
| // Needs to be the same pixel ratio otherwise our dimensions won't match the | ||
| // last transform layer. | ||
| image = await layer.toImage(renderView.paintBounds, pixelRatio: 1.0); | ||
| image = await layer.toImage(renderView.paintBounds, pixelRatio: 1 / 3); |
Contributor
There was a problem hiding this comment.
Just curious, why the 1/3 change? It seems like the comment above this line no longer fully holds.
Contributor
Author
There was a problem hiding this comment.
When I used the semantics node, we ended up including the dpr transform. Now that I'm using the rect from the render box, this doesn't include the dpr transform
Contributor
Author
|
Submitting, build is currently green but dashboard may be unable to update older PRs |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
Description
Instead of using the pixels under the entire semantics node, use the renderbox of the text widget. This shrinks the number of pixels considered and makes it less likely that background colors are assumed to be part of the text contrast.
Related Issues
Replace this paragraph with a list of issues related to this PR from our issue database. Indicate, which of these issues are resolved or fixed by this PR.
Tests
I added the following tests:
Checklist
Before you create this PR confirm that it meets all requirements listed below by checking the relevant checkboxes (
[x]). This will ensure a smooth and quick review process.///).flutter analyze --flutter-repo) does not report any problems on my PR.Breaking Change
Does your PR require Flutter developers to manually update their apps to accommodate your change?