-
Notifications
You must be signed in to change notification settings - Fork 29.1k
Fix LinearProgressIndicator track painting. #173108
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Fix LinearProgressIndicator track painting. #173108
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Review
This pull request fixes an issue where the LinearProgressIndicator track was painting outside of its bounds when a trackGap was specified. The fix involves clamping the track's rectangle coordinates and adding a check for track width before drawing. A regression golden test has also been added.
Golden file changes have been found for this pull request. Click here to view and triage (e.g. because this is an intentional change). If you are still iterating on this change and are not ready to resolve the images on the Flutter Gold dashboard, consider marking this PR as a draft pull request above. You will still be able to view image results on the dashboard, commenting will be silenced, and the check will not try to resolve itself until marked ready for review. For more guidance, visit Writing a golden file test for Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. |
This pull request has been changed to a draft. The currently pending flutter-gold status will not be able to resolve until a new commit is pushed or the change is marked ready for review again. For more guidance, visit Writing a golden file test for Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. |
Golden file changes are available for triage from new commit, Click here to view. For more guidance, visit Writing a golden file test for Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I haven't finished my review but thank you so much for your contribution. Overall it looks good! Will take another look! The golden tests look great!
Hi @QuncCccccc, thanks a lot for your review and suggestions! I added a number of comments to help understand the code. Could you please take a look again when you have time? |
Fixes #164538
Fixes #173096
Fixes #173153
Description
trackGap
in indeterminateLinearProgressIndicator
LinearProgressIndicator
bounds whentrackGap
is greater than zeroLinearProgressIndicator
track gap painting whenvalue
is 0Compose
ProgressIndicator
implementation was used as a reference.trackGap: 20
)trackGap: 20
)Pre-launch Checklist
///
).If you need help, consider asking for advice on the #hackers-new channel on Discord.