]> git.sesse.net Git - vlc/commit
skins2: implement relative positioning
authorErwan Tulou <erwan10@videolan.org>
Mon, 22 Nov 2010 14:38:56 +0000 (15:38 +0100)
committerErwan Tulou <erwan10@videolan.org>
Mon, 22 Nov 2010 15:22:27 +0000 (16:22 +0100)
commit6f772953ac0e7eeffa1d98606988d1e148f1c468
tree6fe105614748d39ee24e79eaee40dbc885be5256
parent5d7acec1a0a4b79e013bf07e842bc77f6680c0f1
skins2: implement relative positioning

So far in skins2, all x, y, width and height were given in pixels, and
no reference to the screen resolution could be made.

This patch implements the following :
- all x, y, width, height can be given in pixels or in % of their container.
  For windows, the container is the screen. For widgets, it can be the
  layout or a panel.
- Five new tags eases up positioning
  - position : relative position given as "Center", "West", "NorthWest", ...
  - x/y-margin : margins to take into account (in px or %) wrt the borders.
  - x/y-offset : additional offset to apply (in px or %).
- the image control can now accept a width and a height parameters.
modules/gui/skins2/parser/builder.cpp
modules/gui/skins2/parser/builder_data.def
modules/gui/skins2/parser/builder_data.hpp
modules/gui/skins2/parser/skin_parser.cpp
modules/gui/skins2/parser/skin_parser.hpp
share/skins2/skin.dtd