Skip to content

Commit 0817eaa

Browse files
gabrieldonadelkelset
authored andcommitted
Revert "fix: border width top/bottom not matching the border radius" (#37840)
Summary: In an effort to fix #37753, this PR reverts the changes introduced by cd6a913 and 1d51032 so border-radius width calculations work as expected ## Changelog: [ANDROID] [FIXED] - Fix border-radius width calculations Pull Request resolved: #37840 Test Plan: Test border colors along with border-radius through RNTester <img width="538" alt="image" src="https://github.com/facebook/react-native/assets/11707729/4b148d4b-35dc-4737-be00-c5ff156b0865"> Reviewed By: dmytrorykun Differential Revision: D46684071 Pulled By: cipolleschi fbshipit-source-id: cf7a80d0d63009b457f03d690b632e332a9b4a02
1 parent 0da7e06 commit 0817eaa

File tree

1 file changed

+4
-10
lines changed

1 file changed

+4
-10
lines changed

packages/react-native/ReactAndroid/src/main/java/com/facebook/react/views/view/ReactViewBackgroundDrawable.java

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -894,7 +894,7 @@ private void updatePath() {
894894

895895
/** Compute mInnerTopLeftCorner */
896896
mInnerTopLeftCorner.x = mInnerClipTempRectForBorderRadius.left;
897-
mInnerTopLeftCorner.y = mInnerClipTempRectForBorderRadius.top * 2;
897+
mInnerTopLeftCorner.y = mInnerClipTempRectForBorderRadius.top;
898898

899899
getEllipseIntersectionWithLine(
900900
// Ellipse Bounds
@@ -920,10 +920,7 @@ private void updatePath() {
920920
}
921921

922922
mInnerBottomLeftCorner.x = mInnerClipTempRectForBorderRadius.left;
923-
mInnerBottomLeftCorner.y =
924-
borderWidth.bottom != 0
925-
? mInnerClipTempRectForBorderRadius.bottom * -2
926-
: mInnerClipTempRectForBorderRadius.bottom;
923+
mInnerBottomLeftCorner.y = mInnerClipTempRectForBorderRadius.bottom;
927924

928925
getEllipseIntersectionWithLine(
929926
// Ellipse Bounds
@@ -949,7 +946,7 @@ private void updatePath() {
949946
}
950947

951948
mInnerTopRightCorner.x = mInnerClipTempRectForBorderRadius.right;
952-
mInnerTopRightCorner.y = mInnerClipTempRectForBorderRadius.top * 2;
949+
mInnerTopRightCorner.y = mInnerClipTempRectForBorderRadius.top;
953950

954951
getEllipseIntersectionWithLine(
955952
// Ellipse Bounds
@@ -975,10 +972,7 @@ private void updatePath() {
975972
}
976973

977974
mInnerBottomRightCorner.x = mInnerClipTempRectForBorderRadius.right;
978-
mInnerBottomRightCorner.y =
979-
borderWidth.bottom != 0
980-
? mInnerClipTempRectForBorderRadius.bottom * -2
981-
: mInnerClipTempRectForBorderRadius.bottom;
975+
mInnerBottomRightCorner.y = mInnerClipTempRectForBorderRadius.bottom;
982976

983977
getEllipseIntersectionWithLine(
984978
// Ellipse Bounds

0 commit comments

Comments
 (0)