compose-multiplatform
compose-multiplatform copied to clipboard
Uneven border width when using `RoundedCornerShape`
Example
fun main() = Window {
Box(
modifier = Modifier
.padding(16.dp)
.preferredWidth(40.dp)
.preferredHeight(40.dp)
.background(color = Color.White)
.border(2.dp, Color.Red, shape = RoundedCornerShape(20.dp))
)
}
Could you please clarify, what is expected result here?
The entire circle border should have the same width. If you look closely, the top half looks uniform but the bottom half does not.
Indeed, it's somewhat distorted. Is Android behavior the same?
Same on Android
Box(
modifier = Modifier
.padding(16.dp)
.width(300.dp)
.height(300.dp)
.background(color = Color.White)
.border(20.dp, Color.Red, shape = RoundedCornerShape(150.dp))
)

Please check the following ticket on YouTrack for follow-ups to this issue. GitHub issues will be closed in the coming weeks.