Michael Paus
02/14/2022, 12:50 PMval densityDpi = LocalContext.current.resources.displayMetrics.densityDpi
This only seems to work on Android or maybe I am just blind and don’t see the obvious.Sebastian Kürten
02/14/2022, 1:03 PMval density = LocalDensity.current
help?ishitatsuyuki
02/14/2022, 1:04 PMLocalDensity
should be good enough to get that value in an application.Michael Paus
02/14/2022, 2:22 PMval scaledDpi = Toolkit.getDefaultToolkit().screenResolution
val displayScalingFactor = LocalDensity.current.density.dp.value
val physicalDpi = displayScalingFactor * scaledDpi
I think the underlying issue is this: https://github.com/JetBrains/compose-jb/issues/531