Thanks all. Got it but can't get theme.ui to work with visions xml file.

It looks like ParseColor() is writing over pBitmap creating an exception..
using theme.xml (latest from robert).

    if (oElement == string("Bitmap"))
    {
       Bitmap *pBitmap;
       Color   oColor;

#ifdef WIN32
       pBitmap = new Win32Bitmap(oAttrMap["Name"]);
#elif defined(HAVE_GTK)
       pBitmap = new GTKBitmap(oAttrMap["Name"]);
#elif defined(__BEOS__)
       pBitmap = new BeOSBitmap(oAttrMap["Name"]);
#endif

    if (oAttrMap.find("TransColor") != oAttrMap.end())
       {
           eRet = ParseColor(oAttrMap["TransColor"], oColor);
           if (eRet == kError_NoErr)
               pBitmap->SetTransColor(oColor);
       }
<!-- Liquified Visions theme by Valters Vingolds ([EMAIL PROTECTED]) -->
<!-- based on visions skin of rainplay by Bill Yuan -->

<Bitmap Name="Background" File="background.bmp"/ TransColor="#1800FF"/>
<Bitmap Name="Buttons" File="buttons.bmp"/>
<Font Name="San Serif" Face="Arial"/>

<Window Name="MainWindow">
    <BackgroundBitmap Name="Background" Rect="0, 0, 168, 79"/>
    <Controls>
        <ButtonControl Name="Prev">
            <Position Rect="7, 54, 24, 73">  
            <ControlBitmap Rect="0, 18, 71, 37" Name="Buttons"/>
        </ButtonControl>

        <ButtonControl Name="Quit">
            <Position Rect="150, 7, 157, 14">
            <ControlBitmap Rect="0, 0, 31, 7" Name="Buttons"/>
        </ButtonControl>

        <ButtonControl Name="Minimize">
            <Position Rect="139, 7, 146, 14">
            <ControlBitmap Rect="0, 9, 31, 16" Name="Buttons"/>
        </ButtonControl>

        <ButtonControl Name="Stop">
            <Position Rect="25, 54, 41, 73">
            <ControlBitmap Rect="0, 39, 67, 58" Name="Buttons"/>
        </ButtonControl>

        <ButtonControl Name="Play">
            <Position Rect="42, 54, 58, 73">
            <ControlBitmap Rect="0, 60, 67, 79" Name="Buttons"/>
        </ButtonControl>

        <!-- pause button looks crappy... I had to draw it -->
        <!-- please draw it properly if you can (I know I can't) -->
        <ButtonControl Name="Pause">
            <Position Rect="42, 54, 58, 73">
            <ControlBitmap Rect="0, 123, 67, 142" Name="Buttons"/>
        </ButtonControl>

        <ButtonControl Name="Next">
            <Position Rect="59, 54, 75, 73">
            <ControlBitmap Rect="0, 81, 67, 100" Name="Buttons"/>
        </ButtonControl>

        <!-- this one should be 'load song/playlist' type button -->
        <ButtonControl Name="Quit">
            <Position Rect="76, 54, 94, 73">
            <ControlBitmap Rect="0, 102, 75, 121" Name="Buttons"/>
        </ButtonControl>

        <!-- these rectangle positions are not really tested -->
        <!-- may need some adjustment -->
        <TextControl Name="Title">
            <Style Font="San Serif" Align="Left"/>
            <Position Rect="12, 22, 157, 36">
        </ButtonControl>

        <TextControl Name="Time">
            <Style Font="San Serif" Align="Right"/>
            <Position Rect="103, 38, 157, 53">
        </TextControl>

        <!-- not sure what more TextContols to put there -->

    </Controls>
</Window>            

Reply via email to