Making plugin widget maintain a certain aspect ratio

How could I make a plugin widget maintain a certain aspect ratio?