How can I make an Icon visibly bigger? I've tried ...
# compose
f
How can I make an Icon visibly bigger? I've tried various size modifiers (preferred, width, height, size, etc) but they only make the icon take more space, and the icons stays just as small.
Copy code
Icon(Icons.Rounded.Search, Modifier.padding(8.dp).preferredSize(60.dp)) // Actual icon size looks around 30dp
n
have you tried
contentScale = ContentScale.FillHeight
(or another
ContentScale
value)?
v
Can you try this. This should work..
Copy code
Icon(asset = Icons.Rounded.Search.copy(defaultHeight = 100.dp, defaultWidth = 100.dp))
f
@nglauber I'm not sure where you mean I can pass a
contentScale
argument
@Vinay Gaba Thank you, that did it, I wonder if this api will stay, it seems weird to me they would mix size and image 🤔
v
yeah we’ve spoken about this before on the channel and I suspect and hope that modifiers will start to change it’s size as well.