Imagine a container (say a frame) 40 x 40. And, dozens of icons with different aspect ratios and sizes, e.g., 10x20, 30x5, 50x45, etc.
I want to setup this frame (or a set of nested frames) such that when I drop an icon inside the inner-most frame, the icon automatically scales proportionately to fill the 40x40 container. So, a 10x20 icon when dropped inside, would automatically become 20x40 (i.e. it would retain the aspect ratio and not exceed the 40x40 limit).
I know how to do this manually but am looking for an automatic solution. Would greatly appreciate a solution.