compose-multiplatform icon indicating copy to clipboard operation
compose-multiplatform copied to clipboard

Uneven border width when using `RoundedCornerShape`

Open ragunathjawahar opened this issue 4 years ago • 5 comments

Screenshot 2021-01-23 at 1 52 14 PM

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))
  )
}

ragunathjawahar avatar Jan 23 '21 08:01 ragunathjawahar

Could you please clarify, what is expected result here?

olonho avatar Jan 25 '21 05:01 olonho

The entire circle border should have the same width. If you look closely, the top half looks uniform but the bottom half does not.

ragunathjawahar avatar Jan 25 '21 05:01 ragunathjawahar

Indeed, it's somewhat distorted. Is Android behavior the same?

olonho avatar Jan 25 '21 06:01 olonho

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))
            )

image

igordmn avatar Jan 25 '21 09:01 igordmn

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

okushnikov avatar Aug 26 '24 17:08 okushnikov