One of the main problems of using Material compone...
# compose-desktop
m
One of the main problems of using Material components for desktop applications is that they enforce a lot of extra space around interactive components like, e.g., buttons. This often looks strange compared to regular desktop applications. I just learned on the compose channel that this can actually be cured very easily by just switching this mechanism off globally like this:
Copy code
val isTouchDevice = remember { <Somehow determine whether running on a touch device or not> }

CompositionLocalProvider(LocalMinimumInteractiveComponentEnforcement provides isTouchDevice) {

	<Your code here>

}
I just gave that a try and it really worked nicely. It is even possible to switch that at runtime, so you can let the user decide what his primary input device is. Just wanted to share that for those who did not already know this like me.
👍🏻 1
thank you color 1
👍 9
b
Good find!