Commit eda02c94 authored by Cyril Deguet's avatar Cyril Deguet

* moved the default skins2 theme in share/skins2/default/

  * all: added a "tooltipfont" element in the <Theme> tag (unused at the
      moment)
parent 5db22541
......@@ -116,10 +116,8 @@ void Builder::addTheme( const BuilderData::Theme &rData )
rManager.setMagnetValue( rData.m_magnet );
rManager.setAlphaValue( rData.m_alpha );
rManager.setMoveAlphaValue( rData.m_moveAlpha );
// XXX: font to fix
GenericFont *pFont = new FT2Font( getIntf(), "FreeSans.ttf", 12 );
pFont->init();
rManager.createTooltip( *pFont );
}
......
Theme magnet:int alpha:uint32_t moveAlpha:uint32_t fadeTime:uint32_t
Theme tooltipfont:string magnet:int alpha:uint32_t moveAlpha:uint32_t fadeTime:uint32_t
Bitmap id:string fileName:string alphaColor:uint32_t
Font id:string fontName:string size:int
Window id:string xPos:int yPos:int visible:bool dragDrop:bool playOnDrop:bool
......
......@@ -42,9 +42,10 @@ struct BuilderData
/// Type definition
struct Theme
{
Theme( int magnet, uint32_t alpha, uint32_t moveAlpha, uint32_t fadeTime ):
m_magnet( magnet ), m_alpha( alpha ), m_moveAlpha( moveAlpha ), m_fadeTime( fadeTime ) {}
Theme( const string & tooltipfont, int magnet, uint32_t alpha, uint32_t moveAlpha, uint32_t fadeTime ):
m_tooltipfont( tooltipfont ), m_magnet( magnet ), m_alpha( alpha ), m_moveAlpha( moveAlpha ), m_fadeTime( fadeTime ) {}
const string m_tooltipfont;
int m_magnet;
uint32_t m_alpha;
uint32_t m_moveAlpha;
......
......@@ -25,7 +25,7 @@
#include <math.h>
// Current DTD version
#define SKINS_DTD_VERSION "1.99"
#define SKINS_DTD_VERSION "2.0"
SkinParser::SkinParser( intf_thread_t *pIntf, const string &rFileName ):
......@@ -180,9 +180,9 @@ void SkinParser::handleBeginElement( const string &rName, AttrList_t &attr )
m_errors = true;
return;
}
const BuilderData::Theme theme( atoi( attr["magnet"] ),
atoi( attr["alpha"] ), atoi( attr["movealpha"] ),
atoi( attr["fadetime"] ) );
const BuilderData::Theme theme( attr["tooltipfont"],
atoi( attr["magnet"] ), atoi( attr["alpha"] ),
atoi( attr["movealpha"] ), atoi( attr["fadetime"] ) );
m_data.m_listTheme.push_back( theme );
}
......
<!-- version 1.99
<!-- version 2.0
-->
<!ELEMENT Theme (ThemeInfo,(Bitmap|Font|Window)*)>
<!ATTLIST Theme
version CDATA "1.0"
version CDATA #REQUIRED
tooltipfont CDATA "defaultfont"
magnet CDATA "15"
alpha CDATA "255"
movealpha CDATA "255"
......
<!DOCTYPE Theme SYSTEM "skin.dtd">
<Theme version="1.99" magnet="20" alpha="255" movealpha="192" fadetime="500">
<Theme version="2.0" magnet="20" alpha="255" movealpha="192" fadetime="500">
<ThemeInfo name="VLC OSX Interface" author="BigBen"
email="bigben@videolan.org" webpage="http://www.videolan.org"/>
......@@ -62,8 +62,8 @@
<Bitmap id="stop_onclick" file="stop_onclick.png" alphacolor="#FF0000"/>
<Bitmap id="volume_radial" file="volume.png" alphacolor="#FF0000"/>
<Font id="default_font" font="FreeSansBold.ttf" size="15"/>
<Font id="playlist_font" font="FreeSansBold.ttf" size="12"/>
<Font id="default_font" font="FreeSansBold.ttf" size="15"/>
<Font id="playlist_font" font="FreeSansBold.ttf" size="12"/>
<Window x="230" y="250" dragdrop="true">
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment