Hi! When I get the width of e.g. a Box , I get for...
# compose-desktop
f
Hi! When I get the width of e.g. a Box , I get for example 1600, I guess this is in Pixel and not in DP?
i
Usually, if Compose returns something in Float or in Int, it is pixels, not Dp. If you need to convert it to Dp, use this:
Copy code
with(LocalDensity.current) {
   value.toDp()
}