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.91k stars 1.16k forks source link

Border`s width mismatch when set it to 0.dp #910

Open wwalkingg opened 3 years ago

wwalkingg commented 3 years ago

when set width to 0.dp

Window {
        Box(Modifier.padding(10.dp)){
            Box(
                modifier = Modifier.size(200.dp,180.dp).background(Color.Red.copy(alpha = 0.2f))
                    .border(color = Color.Primary,width =0.dp)
            ){}
        }
    }

Screenshot_20210720_155433 show mismatch! i can just set it to 0.001:

border(color = Color.Primary,width =0.001.dp)

Screenshot_20210720_155433

akurasov commented 3 years ago

Hi! The issue is that border is drawn even when it's width is zero, or is it something else?

wwalkingg commented 3 years ago

Hi! The issue is that border is drawn even when it's width is zero, or is it something else? at least it should be invisible , i think

akurasov commented 3 years ago

Do you know if it is the same in Jetpack Compose(on Android)?

wwalkingg commented 3 years ago

Do you know if it is the same in Jetpack Compose(on Android)?

sorry,i just

Do you know if it is the same in Jetpack Compose(on Android)?

sorry, I do not know. I just develop desktop applications🤯

akurasov commented 3 years ago

I tried it on Android and behavior is different. Probably we should align it in Compose MPP.

@WWALKINGG, do you have any business task related to this issue, or it is just a finding you wanted to share?

wwalkingg commented 3 years ago

I tried it on Android and behavior is different. Probably we should align it in Compose MPP.

@WWALKINGG, do you have any business task related to this issue, or it is just a finding you wanted to share?

its a finding.i have achieved my goal with another way.

akurasov commented 3 years ago

Thank you. I believe it's priority is not very high then(zero-size border seems to be not used very often). Anyway will look at it eventually.

okushnikov commented 2 months ago

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