[vlc-commits] commit: skins2: implement relative positioning (Erwan Tulou )

git at videolan.org git at videolan.org
Mon Nov 22 16:36:17 CET 2010


vlc | branch: master | Erwan Tulou <erwan10 at videolan.org> | Mon Nov 22 15:38:56 2010 +0100| [6f772953ac0e7eeffa1d98606988d1e148f1c468] | committer: Erwan Tulou 

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.

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=6f772953ac0e7eeffa1d98606988d1e148f1c468
---

 modules/gui/skins2/parser/builder.cpp      |    4 +-
 modules/gui/skins2/parser/builder_data.def |    4 +-
 modules/gui/skins2/parser/builder_data.hpp |   17 +-
 modules/gui/skins2/parser/skin_parser.cpp  |  323 +++++++++++++++++++++++++---
 modules/gui/skins2/parser/skin_parser.hpp  |   23 ++
 share/skins2/skin.dtd                      |   27 +++
 6 files changed, 365 insertions(+), 33 deletions(-)

Diff:   http://git.videolan.org/gitweb.cgi/vlc.git/?a=commitdiff;h=6f772953ac0e7eeffa1d98606988d1e148f1c468


More information about the vlc-commits mailing list