Is it possible to scale my entire desktop app up by a factor of say 1,5? Ive tried using scale, and while it works - elements also go off screen, etc. Im looking to acheive something similar to how the emulator window scales its content when you resize it, and all of this is for debugging purposes only.. so somewhat hacky solutions are OK 😅
j
Jonas
02/12/2024, 6:35 AM
Maybe it’s enough to override your Local Density?
Copy code
val localDensity = LocalDensity.current
val newDensity = Density(fontScale = localDensity.fontScale * 1.5f, density = localDensity.density * 1.5f)
CompositionLocalProvider(LocalDensity provides newDensity) {
...
Pseudo code, haven’t tried it out yet.
🎉 1
Jonas
02/12/2024, 6:43 AM
But I think that does not really achieve what you want.
z
Zoltan Demant
02/12/2024, 7:26 AM
Actually that worked perfectly! Thank you 👍🏽
j
Jonas
02/12/2024, 7:27 AM
Glad I could help. You’re welcome. 🙂
💪🏽 1
j
Joel Denke
02/12/2024, 7:28 AM
Yeah the power of local compositions, can always override them 😄