Hello, is there a way to make the default padding ...
# compose-desktop
d
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?
a
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
g
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.
s
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: https://m3.material.io/components/floating-action-button/guidelines#34a9762a-b855-465d-9263-650b81a05f42