https://kotlinlang.org logo
a

Arjan van Wieringen

10/04/2022, 4:34 PM
Why do I standard have a top and bottom padding on a Button? The minimal example here is:
Copy code
fun main() = singleWindowApplication(
    title = "Foo",
    state = WindowState(size = DpSize(1280.dp, 800.dp))
) {
    Button(onClick = {}) {
       Text("Foo")
    }
}
I get a top margin. When I bottom align I get a bottom margin. It doesn't matter if I change
contentPadding
or padding on any modifier. When I use a Card I don't get a padding.
k

Kirill Grouchnikov

10/04/2022, 6:13 PM
When you use a material component, you get all the opinionated parts of it. If you want finer grained control that is not exposed by these components, you can roll your own.