Skip to content

Fix issue where inset border radius was off when there is a border#45658

Closed
joevilches wants to merge 1 commit into
facebook:mainfrom
joevilches:export-D60083309
Closed

Fix issue where inset border radius was off when there is a border#45658
joevilches wants to merge 1 commit into
facebook:mainfrom
joevilches:export-D60083309

Conversation

@joevilches
Copy link
Copy Markdown
Contributor

Summary:
The border radius of the inner "clear region" for inset shadows is based off of the border radius of the padding box path (i.e. the shadow path). Notably, this is not the View's given border radius iff there is a border present.

To get this "inner border radius" I added a new method inside of CSSBackgroundDrawable. This logic was already present here, so I tried to share most of the code there. There may be a better way to do this, but this seems to be the quickest.

Reviewed By: NickGerleman

Differential Revision: D60083309

@facebook-github-bot facebook-github-bot added CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. p: Facebook Partner: Facebook Partner labels Jul 25, 2024
@facebook-github-bot
Copy link
Copy Markdown
Contributor

This pull request was exported from Phabricator. Differential Revision: D60083309

@facebook-github-bot
Copy link
Copy Markdown
Contributor

This pull request was exported from Phabricator. Differential Revision: D60083309

@facebook-github-bot
Copy link
Copy Markdown
Contributor

This pull request was exported from Phabricator. Differential Revision: D60083309

1 similar comment
@facebook-github-bot
Copy link
Copy Markdown
Contributor

This pull request was exported from Phabricator. Differential Revision: D60083309

…acebook#45658)

Summary:
Pull Request resolved: facebook#45658

The border radius of the inner "clear region" for inset shadows is based off of the border radius of the padding box path (i.e. the shadow path). Notably, this is not the View's given border radius iff there is a border present.

To get this "inner border radius" I added a new method inside of `CSSBackgroundDrawable`. This logic was already present [here](https://www.internalfb.com/code/fbsource/[33e35cbf387a]/xplat/js/react-native-github/packages/react-native/ReactAndroid/src/main/java/com/facebook/react/uimanager/drawable/CSSBackgroundDrawable.java?lines=643-650), so I tried to share most of the code there. There may be a better way to do this, but this seems to be the quickest.

Changelog: [Internal]

Reviewed By: NickGerleman

Differential Revision: D60083309
@facebook-github-bot
Copy link
Copy Markdown
Contributor

This pull request was exported from Phabricator. Differential Revision: D60083309

@facebook-github-bot
Copy link
Copy Markdown
Contributor

This pull request has been merged in 8fe3ae3.

@facebook-github-bot facebook-github-bot added the Merged This PR has been merged. label Jul 27, 2024
@react-native-bot
Copy link
Copy Markdown
Collaborator

This pull request was successfully merged by @joevilches in 8fe3ae3

When will my fix make it into a release? | How to file a pick request?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported Merged This PR has been merged. p: Facebook Partner: Facebook Partner

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants