xbmc/xbmc — pull request #1208 by pieh (2012-07-23 20:13:03+00:00)
Title: make skin controls positioning more flexible

This patches allow more flexible controls placement and sizing. Currently xbmc only allow using <posx>,<posy> to define top left corner of control (relative to its parent control) and <width>,<height> for its size.

This adds <right> and <bottom> tags (and <left>,<top> aliases to <posx>,<posy> for consistency with new tags). <right> and <bottom> tags specify how far right/bottom edge of the control should placed from right/bottom edge of parent. It allows to use combination of 2 from:
- <left/posx>, <width>, <right> (for horizontal placement and sizing)
- <top/posy>, <height>, <bottom> (for vertical placement and sizing)
It also allow using percentage values instead of absolute values (concrete value will be calculated based on parent width or height).

Here are some examples what can be done with this (using just horizontal tags, I hope they are self-explanatory)

<control>
<left>10%</left>
<width>50%</width>
</control>

<control>
<left>30</left>
<right>30</right>
</control>

<control>
<right>20</right>
<width>50%</right>
</control>

Current usage of 'r' suffix for relative positioning is working (in fact with this it would be possible to use it in other tags than posx/posy), but I'd like to mark it as deprecated if this would be pulled.