nifei
8th September 2009, 10:48
Hi.
How to make a widget expand both horizontally and vertically and keep the ratio width by height in the same time.
i mean, if i want the width / height is always 4/3, and occupy as more as possible space.
expected result:
case1: available width = 100, available height = 100, then the widget is expected to be 100 in width and 75 in height;
case2: available width = 100, available height = 60, then the widget should be 80-wide and 60-high.
Have i describe the issue clearly? Thanks in advance for any suggestion.
How to make a widget expand both horizontally and vertically and keep the ratio width by height in the same time.
i mean, if i want the width / height is always 4/3, and occupy as more as possible space.
expected result:
case1: available width = 100, available height = 100, then the widget is expected to be 100 in width and 75 in height;
case2: available width = 100, available height = 60, then the widget should be 80-wide and 60-high.
Have i describe the issue clearly? Thanks in advance for any suggestion.