]> git.sesse.net Git - vlc/commit
skins2: extend xoffset and yoffset parameters
authorErwan Tulou <erwan10@videolan.org>
Sat, 22 Jun 2013 12:05:46 +0000 (14:05 +0200)
committerErwan Tulou <erwan10@videolan.org>
Sat, 22 Jun 2013 13:35:07 +0000 (15:35 +0200)
commit31dafe28c46f1952a564958f1036de5cfe0f06ea
treee0e7b63dde5b01b37c340b0405d20e5bfcca7f7a
parent2bbc88ce52cbfd9ce6a3c47d1397a21f6a972495
skins2: extend xoffset and yoffset parameters

Till now, these two parameters only had a meaning for geographical positioning.
As explained at http://forum.videolan.org/viewtopic.php?f=26&t=111572,
extending xoffset and yoffset for the general case would help a lot skin
developpers easily position an object of unknown size around a given point :
for instance,
    x="50%" xoffset="-50%" would center an object horizontally.
    x="100%" xoffset="-100%" would set an object to the East

This patch doesn't modify the existing behaviour. It just implements a new
feature for the case where it was a silent no op.

x,y, width, height percentages are computed against the parent container
xoffset and yoffset percentages are computed against the current object

TODO: this approach could be generalized to all objects (need to extend the dtd)
modules/gui/skins2/parser/skin_parser.cpp