google / accompanist

A collection of extension libraries for Jetpack Compose
https://google.github.io/accompanist
Apache License 2.0
7.31k stars 592 forks source link

[DrawablePainter] Fix drawable scaling (#1766) #1771

Closed PrimoDev23 closed 1 month ago

PrimoDev23 commented 1 month ago

Properly scales the canvas to match the composables size or uses the drawable size if none is set.

google-cla[bot] commented 1 month ago

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

bentrengrove commented 1 month ago

This is intentional, it is up to drawable implementations how they fill their bounds. By doing this we would be applying scale to every drawable which would not be good.

I'll close this and have a look at the issue for you and see if I can recommend an alternative