JetBrains / compose-multiplatform

Compose Multiplatform, a modern UI framework for Kotlin that makes building performant and beautiful user interfaces easy and enjoyable.
https://jetbrains.com/lp/compose-multiplatform
Apache License 2.0
15.92k stars 1.16k forks source link

There is a rendering problem on border. #948

Open wwalkingg opened 3 years ago

wwalkingg commented 3 years ago

when i set border

Box(
                modifier = Modifier.size(20.dp).clip(CircleShape).background(grade.color).border(1.dp,Color.Primary,
                    CircleShape)
            )

it show: 1 but this looks jagged.The correct effect should be

1

kirill-grouchnikov commented 3 years ago

What if you change the modifier order so that your clip doesn't clip the border?

Modifier.size(20.dp).border(1.dp,Color.Primary, CircleShape).clip(CircleShape).background(grade.color)

akurasov commented 3 years ago

@WWALKINGG and how have you got "should be" circles?

wwalkingg commented 3 years ago

Modifier.size(20.dp).border(1.dp,Color.Primary, CircleShape).clip(CircleShape).background(grade.color) it shows. Screenshot_20210729_003732

wwalkingg commented 3 years ago

@WWALKINGG and how have you got "should be" circles?

just use two box with CircleShape. I always think there are some problem with the border part when i do my graduation project.🐻Maybe I should spend times to look at the source code

okushnikov commented 3 weeks ago

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