mirror of
https://github.com/facebook/react-native.git
synced 2025-11-01 09:14:26 +00:00
Revert "fix: border width top/bottom not matching the border radius" (#37840)
Summary: In an effort to fix https://github.com/facebook/react-native/issues/37753, this PR reverts the changes introduced by https://github.com/facebook/react-native/commit/cd6a91343ee24af83c7437b3f2449b41e97760e9 and https://github.com/facebook/react-native/commit/1d5103227851ab92de889d5e7e910393b5d8743a so border-radius width calculations work as expected ## Changelog: [ANDROID] [FIXED] - Fix border-radius width calculations Pull Request resolved: https://github.com/facebook/react-native/pull/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
This commit is contained in:
committed by
Lorenzo Sciandra
parent
0da7e06f3f
commit
0817eaa301
+4
-10
@@ -894,7 +894,7 @@ public class ReactViewBackgroundDrawable extends Drawable {
|
||||
|
||||
/** Compute mInnerTopLeftCorner */
|
||||
mInnerTopLeftCorner.x = mInnerClipTempRectForBorderRadius.left;
|
||||
mInnerTopLeftCorner.y = mInnerClipTempRectForBorderRadius.top * 2;
|
||||
mInnerTopLeftCorner.y = mInnerClipTempRectForBorderRadius.top;
|
||||
|
||||
getEllipseIntersectionWithLine(
|
||||
// Ellipse Bounds
|
||||
@@ -920,10 +920,7 @@ public class ReactViewBackgroundDrawable extends Drawable {
|
||||
}
|
||||
|
||||
mInnerBottomLeftCorner.x = mInnerClipTempRectForBorderRadius.left;
|
||||
mInnerBottomLeftCorner.y =
|
||||
borderWidth.bottom != 0
|
||||
? mInnerClipTempRectForBorderRadius.bottom * -2
|
||||
: mInnerClipTempRectForBorderRadius.bottom;
|
||||
mInnerBottomLeftCorner.y = mInnerClipTempRectForBorderRadius.bottom;
|
||||
|
||||
getEllipseIntersectionWithLine(
|
||||
// Ellipse Bounds
|
||||
@@ -949,7 +946,7 @@ public class ReactViewBackgroundDrawable extends Drawable {
|
||||
}
|
||||
|
||||
mInnerTopRightCorner.x = mInnerClipTempRectForBorderRadius.right;
|
||||
mInnerTopRightCorner.y = mInnerClipTempRectForBorderRadius.top * 2;
|
||||
mInnerTopRightCorner.y = mInnerClipTempRectForBorderRadius.top;
|
||||
|
||||
getEllipseIntersectionWithLine(
|
||||
// Ellipse Bounds
|
||||
@@ -975,10 +972,7 @@ public class ReactViewBackgroundDrawable extends Drawable {
|
||||
}
|
||||
|
||||
mInnerBottomRightCorner.x = mInnerClipTempRectForBorderRadius.right;
|
||||
mInnerBottomRightCorner.y =
|
||||
borderWidth.bottom != 0
|
||||
? mInnerClipTempRectForBorderRadius.bottom * -2
|
||||
: mInnerClipTempRectForBorderRadius.bottom;
|
||||
mInnerBottomRightCorner.y = mInnerClipTempRectForBorderRadius.bottom;
|
||||
|
||||
getEllipseIntersectionWithLine(
|
||||
// Ellipse Bounds
|
||||
|
||||
Reference in New Issue
Block a user