# compose-desktop

Dragos Rachieru

11/16/2023, 11:12 AM
Hello, is there a way to make the default padding smaller on desktop? For example: FloatingActionButton has the correct padding for mobile, but I want the button to be smaller on desktop, is there a local I can override?

Alexander Maryanovsky

11/16/2023, 11:31 AM
Unfortunately no.
A pretty terrible hack that is sometimes usable to work around this is to scale the widget down by setting LocalDensity to e.g. 0.8, and then scaling back the content of the widget by 1.25
😔 1


11/16/2023, 12:35 PM
As far as I understand, it's the deep consequence of having originally targeted touch screens. I have seen some proposed workarounds, but I haven't tried any of them.

Sean Proctor

11/18/2023, 2:49 PM
FAB is a material design thing and it specifies the amount of padding in the spec. The material library is sometimes very opinionated. Having a FAB on desktop can look out of place. Google recommends putting them in a navigation rail for large screens: