-
Notifications
You must be signed in to change notification settings - Fork 24.4k
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 issue where inset border radius was off when there is a border #45658
Conversation
This pull request was exported from Phabricator. Differential Revision: D60083309 |
This pull request was exported from Phabricator. Differential Revision: D60083309 |
8cb4f98
to
5b3d68c
Compare
…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. Reviewed By: NickGerleman Differential Revision: D60083309
5b3d68c
to
80b3432
Compare
…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
This pull request was exported from Phabricator. Differential Revision: D60083309 |
1 similar comment
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
80b3432
to
2688321
Compare
…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
This pull request was exported from Phabricator. Differential Revision: D60083309 |
2688321
to
9bb374b
Compare
This pull request has been merged in 8fe3ae3. |
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? |
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