:wave: I have updated to compose 1.1.1 and togethe...
# compose
m
๐Ÿ‘‹ I have updated to compose 1.1.1 and together the compose.material to 1.1.1, but since then , in a button in my app there is some change on the way an OutlineButton is rendered. so from this, it ended up as this. Anything known issue on this? the code is quite basic
Copy code
OutlinedButton(
    onClick = actionClick,
    enabled = enabled,
    colors = buttonColors,
    modifier = modifier
        .border(
            border = BorderStroke(
                width = 1.dp,
                color = if (enabled) borderColor else disabledColor
            ),
            shape = RoundedCornerShape(4.dp),
        )
) {
    Text(
        text = actionText.uppercase(),
        textAlign = TextAlign.Center,
        style = CompanyTheme.typography.body,
        maxLines = 1,
        modifier = Modifier.semantics {
            contentDescription = actionContentDescription
        }
    )
}
f
Not an issue I think - it might be tied to the decision to push the material components to be at least 36dp (for accessibility). So basically if your components are smaller than that, Compose will add padding/a larger touch area to make it larger and easier to interact with. It's a bit annoying, because it means that an internal change has UI impacts on your code whether or not you want it. But in the end, it's connected to accessibility and surely helps people use the UI, so it's mostly a positive change.
m
I read about this thank you. Is there any way to override this behaviour?
from the impl of Button in material it seems it is not possible
f
yeah I think it's not - you could use simple buttons etc and not the material ones
m
It seems as the only solution now, yes. Thank you for your help
โค๏ธ 1
c
๐Ÿ™Œ 1
๐Ÿ™ 1
But as mentioned before, this change was to encourage minimum touch targets for UI components, remove/opt-out with caution
๐Ÿ‘ 1
๐Ÿ™Œ 1
m
thank you! I had already ran into that, looks kind of hidden to use, for a good reason ๐Ÿ˜‰
๐Ÿ™‚ 1