-
Notifications
You must be signed in to change notification settings - Fork 28.9k
fix RangeSlider, with no overlayShape shifts to the left #125483
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
fix RangeSlider, with no overlayShape shifts to the left #125483
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.
Thanks for the PR! This looks good to me with some format fixes
@TahaTesser Thanks for these format fixes. I have commit submitted these fixes |
…hape. These two RangeSliderTrackShape do not take into account the width of RangeThumbShape. If the width of RangeThumbShape is larger than the width of OverlayShape, the RangeSlider will be drawn out of bounds and the display will not meet expectations. And the Slider trackShape calculation logic is in line with expectations, the modified reference BaseSliderTrackShape here, write a new BaseRangeSliderTrackShape
Co-authored-by: Taha Tesser <tessertaha@gmail.com>
Co-authored-by: Taha Tesser <tessertaha@gmail.com>
Co-authored-by: Taha Tesser <tessertaha@gmail.com>
Co-authored-by: Taha Tesser <tessertaha@gmail.com>
Co-authored-by: Taha Tesser <tessertaha@gmail.com>
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.
LGTM
cc: @werainkhatri |
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.
Welcome @arvinwli! Thank you for contributing. :) |
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.
LGTM! thanks for your contribution! nice work creating the mixin.
TIL dart supports writing a mixins to override inherited methods. wow.
Looks like even tho the tree is green, |
Strange! What a stubborn bot. Merging! |
fixes #125467
fix RectangularRangeSliderTrackShape and RoundedRectRangeSliderTrackShape. These two RangeSliderTrackShape do not take into account the width of RangeThumbShape. If the width of RangeThumbShape is larger than the width of OverlayShape, the RangeSlider will be drawn out of bounds and the display will not meet expectations. And the Slider trackShape calculation logic is in line with expectations, the modified reference BaseSliderTrackShape here, write a new BaseRangeSliderTrackShape
BaseSliderTrackShape takes the width of the thumbShape into account when calculating 。left As follows


But RoundedRectRangeSliderTrackShape did not consider rangeThumbShape RoundedRectRangeSliderTrackShape width, as follows
Therefore, the modification plan is:
Pre-launch Checklist
///
).If you need help, consider asking for advice on the #hackers-new channel on Discord.