Skip to content
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

ToggleButtons focus,highlight,hoverElevation = 0 #75454

Merged

Conversation

HansMuller
Copy link
Contributor

@HansMuller HansMuller commented Feb 4, 2021

The focus, highlight, and hoverElevation for ToggleButtons should be zero. Till now, these elevations were not specified and the underlying RawMaterialButtonWidget made them 4 by default. This caused the usual problems with elevated Material widgets with translucent backgrounds: the grey elevation shadow fills the widget and shows through the translucent background.

Old ToggleButtons with item 0 focused, item 1 hovered, item 2 selected:

Screen Shot 2021-02-04 at 6 20 30 PM

New ToggleButtons

Screen Shot 2021-02-04 at 6 17 49 PM

Fixes #73403

@flutter-dashboard
Copy link

It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact Hixie on the #hackers channel in Chat.

If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix?

Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing.

@flutter-dashboard flutter-dashboard bot added f: material design flutter/packages/flutter/material repository. framework flutter/packages/flutter repository. See also f: labels. labels Feb 4, 2021
@google-cla google-cla bot added the cla: yes label Feb 4, 2021
Copy link
Contributor

@shihaohong shihaohong left a comment

Choose a reason for hiding this comment

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

LGTM

@fluttergithubbot fluttergithubbot merged commit a77388e into flutter:master Feb 5, 2021
@HansMuller HansMuller deleted the toggle_buttons_elevation branch February 5, 2021 16:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
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.

Weird 3D effect in ToggleButtons (in flutter web)
3 participants