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

Update padding for the helper icon. #2106

Merged
merged 4 commits into from
Sep 8, 2023

Conversation

santosh-pingle
Copy link
Collaborator

@santosh-pingle santosh-pingle commented Aug 1, 2023

IMPORTANT: All PRs must be linked to an issue (except for extremely trivial and straightforward changes).

Fixes #2093

Description
Default padding of icon in TextButton was pushing icon to the right end, as result icon appeared as cut on right side.
Default padding is overridden so that it will not pushed to the right side.

Alternative(s) considered
Have you considered any alternatives? And if so, why have you chosen the approach in this PR?

Type
Choose one: Bug fix

Screenshots (if applicable)

Checklist

  • I have read and acknowledged the Code of conduct.
  • I have read the Contributing page.
  • I have signed the Google Individual CLA, or I am covered by my company's Corporate CLA.
  • I have discussed my proposed solution with code owners in the linked issue(s) and we have agreed upon the general approach.
  • I have run ./gradlew spotlessApply and ./gradlew spotlessCheck to check my code follows the style guide of this project.
  • I have run ./gradlew check and ./gradlew connectedCheck to test my changes locally.
  • I have built and run the demo app(s) to verify my change fixes the issue and/or does not break the demo app(s).

@santosh-pingle
Copy link
Collaborator Author

Screenshot 2023-08-01 at 1 33 28 PM

@santosh-pingle santosh-pingle marked this pull request as ready for review August 1, 2023 08:04
@santosh-pingle santosh-pingle requested a review from a team as a code owner August 1, 2023 08:04
Copy link
Collaborator

@jingtang10 jingtang10 left a comment

Choose a reason for hiding this comment

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

it looks like the help icon is 48x48px... but i don't understand why it's more cropped given the height and width are 24dp. does this mean android is automatically scaling the image? and if so, why isn't it scaled perfectly since 48x48 and 24x24 are both perfectly square? what's causing the crop on the right?

can you update the xml file itself to see a 24x24 icon would work better?

by changing the size to 28 we're making the row taller, right?

@shelaghm

@santosh-pingle
Copy link
Collaborator Author

it looks like the help icon is 48x48px... but i don't understand why it's more cropped given the height and width are 24dp. does this mean android is automatically scaling the image? and if so, why isn't it scaled perfectly since 48x48 and 24x24 are both perfectly square? what's causing the crop on the right?

can you update the xml file itself to see a 24x24 icon would work better?

by changing the size to 28 we're making the row taller, right?

@shelaghm

Done.
Added custom style for help button, where padding is overridden around the icon.

@santosh-pingle
Copy link
Collaborator Author

Screenshot 2023-08-30 at 4 04 36 PM

@jingtang10 jingtang10 changed the title Update width and height. Update width and height of the helper icon Sep 6, 2023
@santosh-pingle santosh-pingle changed the title Update width and height of the helper icon Update padding for the helper icon. Sep 7, 2023
@jingtang10 jingtang10 merged commit bc5cf95 into google:master Sep 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Complete
Development

Successfully merging this pull request may close these issues.

Help icon cropped (a bit on the right side)
2 participants