How to use Sprite-Size-Mode TRIMMED, along with widgets?

How to use Sprite-Size-Mode TRIMMED, along with widgets?
0

hi,
I am trying to resize my sprites(using widgets) according to screen resolution(which is also variable, and I use canvas designResolution), and I want to maintain the aspect ratio of my sprites regardless of the screen resolution. I set the size mode in sprite component to TRIMMED and checked the trim check-box. however, when the widgets come into effect the aspect ratio of the sprites changes and the sprite size mode becomes CUSTOM. how do I force a certain aspect ratio on a sprite?
thanks!