Code: Select all
FontSize=(Min(OriginalFontSize*DraggedBackgroundWidth/OriginalBackgroundWidth,OriginalFontSize*DraggedBackgroundHeight/OriginalBackgroundHeight))
Code: Select all
FontSize=(OriginalFontSize*Min(DraggedBackgroundWidth/OriginalBackgroundWidth,DraggedBackgroundHeight/OriginalBackgroundHeight))
By the way, I think you'll have to do the same on the X and Y coordinates for the elements in the skin, except that OriginalFontSize will be replaced with OriginalX or OriginalY, depending on the adjusted coordinate.
P.S. The Original... values above are the ones you use for the standard / initial positioning and sizing, i.e. when dragging didn't occur yet.