这是indexloc提供的服务,不要输入任何密码
Skip to content

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

Merged
merged 6 commits into from
Apr 28, 2023
Merged

fix RangeSlider, with no overlayShape shifts to the left #125483

merged 6 commits into from
Apr 28, 2023

Conversation

arvinwli
Copy link
Contributor

@arvinwli arvinwli commented Apr 25, 2023

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
image
But RoundedRectRangeSliderTrackShape did not consider rangeThumbShape RoundedRectRangeSliderTrackShape width, as follows
image
Therefore, the modification plan is:

  • Create BaseRangeSliderTrackShape reference BaseSliderTrackShape getPreferredRect**
  • The core modification is to consider the width of rangeThumbShape when calculating the left of RangeSliderTrackShape

image

Pre-launch Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I read and followed the Flutter Style Guide, including Features we expect every widget to implement.
  • I signed the CLA.
  • I listed at least one issue that this PR fixes in the description above.
  • I updated/added relevant documentation (doc comments with ///).
  • I added new tests to check the change I am making, or this PR is test-exempt.
  • All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

@flutter-dashboard flutter-dashboard bot added f: material design flutter/packages/flutter/material repository. framework flutter/packages/flutter repository. See also f: labels. labels Apr 25, 2023
@TahaTesser TahaTesser self-requested a review April 25, 2023 12:29
@arvinwli arvinwli changed the title fix RectangularRangeSliderTrackShape and RoundedRectRangeSliderTrackS… fix RangeSlider, with no overlayShape shifts to the left Apr 25, 2023
Copy link
Member

@TahaTesser TahaTesser left a 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

@arvinwli
Copy link
Contributor Author

@TahaTesser Thanks for these format fixes. I have commit submitted these fixes

arvinwli and others added 6 commits April 27, 2023 09:58
…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>
@arvinwli arvinwli requested a review from TahaTesser April 27, 2023 02:39
Copy link
Member

@TahaTesser TahaTesser left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@TahaTesser TahaTesser requested a review from werainkhatri April 27, 2023 12:32
@TahaTesser
Copy link
Member

cc: @werainkhatri
For second review.

@Piinks Piinks added a: quality A truly polished experience c: tech-debt Technical debt, code quality, testing, etc. labels Apr 27, 2023
Copy link
Contributor

@Piinks Piinks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Flutter_LGTM

@Piinks
Copy link
Contributor

Piinks commented Apr 27, 2023

Welcome @arvinwli! Thank you for contributing. :)

Copy link
Member

@werainkhatri werainkhatri left a 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.

@werainkhatri werainkhatri added the autosubmit Merge PR when tree becomes green via auto submit App label Apr 27, 2023
@TahaTesser
Copy link
Member

Looks like even tho the tree is green, autosubmit doesn't merge the PR. Similar to this case

@Piinks
Copy link
Contributor

Piinks commented Apr 28, 2023

Strange! What a stubborn bot. Merging!

engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Apr 29, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Apr 29, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Apr 29, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Apr 30, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Apr 30, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 1, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 1, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 1, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 1, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 1, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 1, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 1, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 1, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 1, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request May 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a: quality A truly polished experience autosubmit Merge PR when tree becomes green via auto submit App c: tech-debt Technical debt, code quality, testing, etc. f: material design flutter/packages/flutter/material repository. framework flutter/packages/flutter repository. See also f: labels.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

RangeSlider, with no overlayShape shifts to the left ,There is a problem with width calculation
4 participants