<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE displayplugin SYSTEM "../../../dtd/displayplugin.dtd">

<displayplugin x="0" y="0" width="100%" height="100%" fadetime="0" scaletvx="0" scaletvy="0" scaletvwidth="100%" scaletvheight="100%">

    <viewelement name="background">
        <area condition="not{hasscrollbar}" x="0" y="0" width="100%" height="100%" layer="4">
            <drawrectangle x="{areawidth}/2 - {menuwidth}*{areawidth}/100/2" y="{areaheight}/2 - {menuheight}*{areaheight}/100/2" width="{menuwidth}*{areawidth}/100" height="{menuheight}*{areaheight}/100" color="{tvgrecmenuback}" />
        </area>
        <area condition="{hasscrollbar}" x="0" y="0" width="100%" height="100%" layer="4">
            <drawrectangle x="{areawidth}/2 - {menuwidth}*{areawidth}/100/2" y="{areaheight}/2 - {menuheight}*{areaheight}/100/2" width="{menuwidth}*{areawidth}/100 + {areawidth}*0.03" height="{menuheight}*{areaheight}/100" color="{tvgrecmenuback}"/>
        </area>
    </viewelement>

    <viewelement name="scrollbar">
        <area x="0" y="0" width="100%" height="100%" layer="6">
             <drawrectangle x="{areawidth}/2 + {menuwidth}*{areawidth}/100/2 + 4" y="{posy}*{areaheight}/100 + {totalheight}*{areaheight}/100 * {offset} / 1000 + 4" width="{areawidth}*0.02 - 8" height="{totalheight}*{areaheight}/100 * {height} / 1000 - 8" color="{progressbar}" />
        </area>
    </viewelement>

    <grid name="recmenu" x="0" y="0" width="100%" height="100%">
        <!-- background -->
        <area condition="not{info}++not{buttonyesno}++not{timerconflictheader}++not{timerconflict}++not{timelineheader}++not{timelinetimer}" layer="5">
            <fill condition="{current}" color="{menubackactive}" />
            <drawrectangle condition="not{current}" x="0" y="{areaheight}-1" width="100%" height="1" color="{menubackline}" />
        </area>
        <!-- info -->
        <area condition="{info}" layer="5">
            <drawtext condition="eq({lines}, 1)" align="center" valign="center" font="{regular}" fontsize="40%" color="{fontdefault}" text="{line1}" />

            <drawtext condition="eq({lines}, 2)" align="center" y="5%" font="{regular}" fontsize="30%" color="{fontdefault}" text="{line1}" />
            <drawtext condition="eq({lines}, 2)" align="center" y="52%" font="{regular}" fontsize="30%" color="{fontdefault}" text="{line2}" />

            <drawtext condition="eq({lines}, 3)" align="center" y="0%" font="{regular}" fontsize="20%" color="{fontdefault}" text="{line1}" />
            <drawtext condition="eq({lines}, 3)" align="center" y="33%" font="{regular}" fontsize="20%" color="{fontdefault}" text="{line2}" />
            <drawtext condition="eq({lines}, 3)" align="center" y="66%" font="{regular}" fontsize="20%" color="{fontdefault}" text="{line3}" />

            <drawtext condition="eq({lines}, 4)" align="center" y="0%" font="{regular}" fontsize="16%" color="{fontdefault}" text="{line1}" />
            <drawtext condition="eq({lines}, 4)" align="center" y="25%" font="{regular}" fontsize="16%" color="{fontdefault}" text="{line2}" />
            <drawtext condition="eq({lines}, 4)" align="center" y="50%" font="{regular}" fontsize="16%" color="{fontdefault}" text="{line3}" />
            <drawtext condition="eq({lines}, 4)" align="center" y="75%" font="{regular}" fontsize="16%" color="{fontdefault}" text="{line4}" />
        </area>
        <!-- button -->
        <area condition="{button}" layer="6">
            <drawtext condition="not{current}" align="center" valign="center" font="{regular}" fontsize="60%" color="{fontdefault}" text="{buttontext}" />
            <drawtext condition="{current}" align="center" valign="center" font="{regular}" fontsize="60%" color="{fontmenuactive}" text="{buttontext}" />
        </area>
        <!-- yes / no button -->
        <areacontainer condition="{buttonyesno}">
            <area layer="5">
                <drawrectangle condition="not{current}" x="2%" y="5%" width="46%" height="90%" color="{tvgbuttoninactive}"/>
                <drawrectangle condition="not{current}" x="52%" y="5%" width="46%" height="90%" color="{tvgbuttoninactive}"/>
                <drawrectangle condition="{current}++{yes}" x="2%" y="5%" width="46%" height="90%" color="{menubackactive}"/>
                <drawrectangle condition="{current}++{yes}" x="52%" y="5%" width="46%" height="90%" color="{tvgbuttoninactive}"/>
                <drawrectangle condition="{current}++not{yes}" x="2%" y="5%" width="46%" height="90%" color="{tvgbuttoninactive}"/>
                <drawrectangle condition="{current}++not{yes}" x="52%" y="5%" width="46%" height="90%" color="{menubackactive}"/>
            </area>
            <area layer="6">
                <drawtext name="yes" x="{areawidth}/4 - {width(yes)}/2" valign="center" font="{regular}" fontsize="60%" color="{fontmenuactive}" text="{textyes}" />
                <drawtext name="no" x="3*{areawidth}/4 - {width(no)}/2" valign="center" font="{regular}" fontsize="60%" color="{fontmenuactive}" text="{textno}" />
            </area>
        </areacontainer>
        <!-- Int Selector -->
        <area condition="{intselector}" layer="6">
            <drawtext condition="not{current}" x="1%" valign="center" font="{regular}" fontsize="60%" color="{fontdefault}" text="{text}" />
            <drawtext condition="not{current}" align="right" valign="center" font="{regular}" fontsize="60%" color="{fontdefault}" text="{intvalue} " />
            <drawtext condition="{current}" x="1%" valign="center" font="{regular}" fontsize="60%" color="{fontmenuactive}" text="{text}" />
            <drawtext condition="{current}" align="right" valign="center" font="{regular}" fontsize="60%" color="{fontmenuactive}" text="{intvalue} " />
        </area>
        <!-- Bool Selector -->
        <area condition="{boolselector}" layer="6">
            <drawtext condition="{current}" x="1%" valign="center" font="{regular}" fontsize="60%" color="{fontmenuactive}" text="{text}" />
            <drawtext condition="not{current}" x="1%" valign="center" font="{regular}" fontsize="60%" color="{fontdefault}" text="{text}" />
            <drawimage condition="{current}++{intvalue}" imagetype="icon" path="ico_yes_active" x="{areawidth} - {areaheight}*0.8" y="10%" width="{areaheight}*0.8" height="{areaheight}*0.8"/>
            <drawimage condition="{current}++not{intvalue}" imagetype="icon" path="ico_no_active" x="{areawidth} - {areaheight}*0.8" y="10%" width="{areaheight}*0.8" height="{areaheight}*0.8"/>
            <drawimage condition="not{current}++{intvalue}" imagetype="icon" path="ico_yes" x="{areawidth} - {areaheight}*0.8" y="10%" width="{areaheight}*0.8" height="{areaheight}*0.8"/>
            <drawimage condition="not{current}++not{intvalue}" imagetype="icon" path="ico_no" x="{areawidth} - {areaheight}*0.8" y="10%" width="{areaheight}*0.8" height="{areaheight}*0.8"/>
        </area>
        <!-- String Selector -->
        <area condition="{stringselector}" layer="6">
            <drawtext condition="not{current}" x="1%" valign="center" font="{regular}" fontsize="60%" color="{fontdefault}" text="{text}" />
            <drawimage condition="not{current}" imagetype="icon" path="ico_arrow_right" x="{areawidth} - {areaheight}*0.8" y="10%" width="{areaheight}*0.8" height="{areaheight}*0.8"/>
            <drawtext condition="not{current}" name="value" x="{areawidth} - {width(value)} - {areaheight}" valign="center" font="{regular}" fontsize="60%" color="{fontdefault}" text="{stringvalue}" />
            <drawimage condition="not{current}" imagetype="icon" path="ico_arrow_left" x="{areawidth} - {width(value)} - 2*{areaheight}" y="10%" width="{areaheight}*0.8" height="{areaheight}*0.8"/>
            <drawtext condition="{current}" x="1%" valign="center" font="{regular}" fontsize="60%" color="{fontmenuactive}" text="{text}" />
            <drawimage condition="{current}" imagetype="icon" path="ico_arrow_right_active" x="{areawidth} - {areaheight}*0.8" y="10%" width="{areaheight}*0.8" height="{areaheight}*0.8"/>
            <drawtext condition="{current}" name="valueactive" x="{areawidth} - {width(valueactive)} - {areaheight}" valign="center" font="{regular}" fontsize="60%" color="{fontmenuactive}" text="{stringvalue}" />
            <drawimage condition="{current}" imagetype="icon" path="ico_arrow_left_active" x="{areawidth} - {width(valueactive)} - 2*{areaheight}" y="10%" width="{areaheight}*0.8" height="{areaheight}*0.8"/>
        </area>
        <!-- Text Input -->
        <areacontainer condition="{textinput}">
            <area layer="6">
                <drawtext condition="not{current}" x="1%" y="10%" font="{regular}" fontsize="30%" color="{fontdefault}" text="{text}" />
                <drawtext condition="{current}" x="1%" y="10%" font="{regular}" fontsize="30%" color="{fontmenuactive}" text="{text}" />
                <drawrectangle condition="not{editmode}" x="1%" y="55%" width="98%" height="40%" color="{tvgtextnotedit}"/>
                <drawrectangle condition="{editmode}" x="1%" y="55%" width="98%" height="40%" color="{tvgtextedit}"/>
            </area>
            <area layer="7">
                <drawtext condition="not{editmode}" align="right" y="60%" font="{regular}" fontsize="30%" color="{tvgtextnotedittext}" text="{stringvalue} " />
                <drawtext condition="{editmode}" align="right" y="60%" font="{regular}" fontsize="30%" color="{tvgtextedittext}" text="{stringvalue} " />
            </area>
        </areacontainer>
        <!-- Time Selector -->
        <area condition="{timeselector}" layer="6">
            <drawtext condition="not{current}" x="1%" valign="center" font="{regular}" fontsize="60%" color="{fontdefault}" text="{text}" />
            <drawtext condition="not{current}" align="right" valign="center" font="{regular}" fontsize="60%" color="{fontdefault}" text="{stringvalue} " />
            <drawtext condition="{current}" x="1%" valign="center" font="{regular}" fontsize="60%" color="{fontmenuactive}" text="{text}" />
            <drawtext condition="{current}" align="right" valign="center" font="{regular}" fontsize="60%" color="{fontmenuactive}" text="{stringvalue} " />
        </area>
        <!-- Day Selector -->
        <area condition="{dayselector}" layer="6">
            <drawtext condition="{current}" x="1%" valign="center" font="{regular}" fontsize="60%" color="{fontdefault}" text="{text}" />
            <drawtext condition="{current}" align="right" valign="center" font="{regular}" fontsize="60%" color="{fontdefault}" text="{stringvalue} " />
            <drawtext condition="not{current}" x="1%" valign="center" font="{regular}" fontsize="60%" color="{fontmenuactive}" text="{text}" />
            <drawtext condition="not{current}" align="right" valign="center" font="{regular}" fontsize="60%" color="{fontmenuactive}" text="{stringvalue} " />
        </area>
        <!-- Channel Selector -->
        <area condition="{channelselector}" layer="6">
            <drawtext condition="not{current}" x="1%" valign="center" font="{regular}" fontsize="60%" color="{fontdefault}" text="{text}" />
            <drawtext condition="{current}" x="1%" valign="center" font="{regular}" fontsize="60%" color="{fontmenuactive}" text="{text}" />
            <drawimage condition="{channellogoexisis}" imagetype="channellogo" path="{channelid}" x="{areawidth}-{areaheight}" valign="center" width="{areaheight}*0.9" height="{areaheight}*0.9" />
            <drawtext condition="not{current}++{channellogoexisis}" name="channelnumberlogo" x="{areawidth}-{areaheight}-{width(channelnumberlogo)}-10" valign="center" font="{regular}" fontsize="60%" color="{fontdefault}" text="{channelnumber}" />
            <drawtext condition="{current}++{channellogoexisis}" name="channelnumberlogoactive" x="{areawidth}-{areaheight}-{width(channelnumberlogoactive)}-10" valign="center" font="{regular}" fontsize="60%" color="{fontmenuactive}" text="{channelnumber}" />
            <drawtext condition="not{current}++not{channellogoexisis}++{channelnumber}" align="right" valign="center" font="{regular}" fontsize="60%" color="{fontdefault}" text="{channelnumber} {channelname} " />
            <drawtext condition="{current}++not{channellogoexisis}++{channelnumber}" align="right" valign="center" font="{regular}" fontsize="60%" color="{fontmenuactive}" text="{channelnumber} {channelname} " />
            <drawtext condition="not{current}++not{channelnumber}" align="right" valign="center" font="{regular}" fontsize="60%" color="{fontdefault}" text="{channelname} " />
            <drawtext condition="{current}++not{channelnumber}" align="right" valign="center" font="{regular}" fontsize="60%" color="{fontmenuactive}" text="{channelname} " />
        </area>
        <!-- Weekday Selector -->
        <areacontainer condition="{weekdayselector}">
            <area layer="6">
                <drawtext condition="not{current}" x="1%" valign="center" font="{regular}" fontsize="60%" color="{fontdefault}" text="{text}" />
                <drawtext condition="{current}" x="1%" valign="center" font="{regular}" fontsize="60%" color="{fontmenuactive}" text="{text}" />
                
                <drawrectangle x="{areawidth} - {areaheight}*4" y="25%" width="{areaheight}*3.5" height="50%" color="{fontdefault}" />

                <drawrectangle condition="not{day0set}" x="{areawidth} - {areaheight}*4.0 + 2" y="{areaheight}*0.25+2" width="{areaheight}*0.5-4" height="{areaheight}*0.5-4" color="{tvgdayinactive}" />
                <drawrectangle condition="{day0set}" x="{areawidth} - {areaheight}*4.0 + 2" y="{areaheight}*0.25+2" width="{areaheight}*0.5-4" height="{areaheight}*0.5-4" color="{tvgdayactive}" />
                
                <drawrectangle condition="not{day1set}" x="{areawidth} - {areaheight}*3.5 + 2" y="{areaheight}*0.25+2" width="{areaheight}*0.5-4" height="{areaheight}*0.5-4" color="{tvgdayinactive}" />
                <drawrectangle condition="{day1set}" x="{areawidth} - {areaheight}*3.5 + 2" y="{areaheight}*0.25+2" width="{areaheight}*0.5-4" height="{areaheight}*0.5-4" color="{tvgdayactive}" />

                <drawrectangle condition="not{day2set}" x="{areawidth} - {areaheight}*3.0 + 2" y="{areaheight}*0.25+2" width="{areaheight}*0.5-4" height="{areaheight}*0.5-4" color="{tvgdayinactive}" />
                <drawrectangle condition="{day2set}" x="{areawidth} - {areaheight}*3.0 + 2" y="{areaheight}*0.25+2" width="{areaheight}*0.5-4" height="{areaheight}*0.5-4" color="{tvgdayactive}" />

                <drawrectangle condition="not{day3set}" x="{areawidth} - {areaheight}*2.5 + 2" y="{areaheight}*0.25+2" width="{areaheight}*0.5-4" height="{areaheight}*0.5-4" color="{tvgdayinactive}" />
                <drawrectangle condition="{day3set}" x="{areawidth} - {areaheight}*2.5 + 2" y="{areaheight}*0.25+2" width="{areaheight}*0.5-4" height="{areaheight}*0.5-4" color="{tvgdayactive}" />

                <drawrectangle condition="not{day4set}" x="{areawidth} - {areaheight}*2.0 + 2" y="{areaheight}*0.25+2" width="{areaheight}*0.5-4" height="{areaheight}*0.5-4" color="{tvgdayinactive}" />
                <drawrectangle condition="{day4set}" x="{areawidth} - {areaheight}*2.0 + 2" y="{areaheight}*0.25+2" width="{areaheight}*0.5-4" height="{areaheight}*0.5-4" color="{tvgdayactive}" />

                <drawrectangle condition="not{day5set}" x="{areawidth} - {areaheight}*1.5 + 2" y="{areaheight}*0.25+2" width="{areaheight}*0.5-4" height="{areaheight}*0.5-4" color="{tvgdayinactive}" />
                <drawrectangle condition="{day5set}" x="{areawidth} - {areaheight}*1.5 + 2" y="{areaheight}*0.25+2" width="{areaheight}*0.5-4" height="{areaheight}*0.5-4" color="{tvgdayactive}" />

                <drawrectangle condition="not{day6set}" x="{areawidth} - {areaheight}*1.0 + 2" y="{areaheight}*0.25+2" width="{areaheight}*0.5-4" height="{areaheight}*0.5-4" color="{tvgdayinactive}" />
                <drawrectangle condition="{day6set}" x="{areawidth} - {areaheight}*1.0 + 2" y="{areaheight}*0.25+2" width="{areaheight}*0.5-4" height="{areaheight}*0.5-4" color="{tvgdayactive}" />
            </area>
            <area layer="7">
                <drawrectangle condition="{current}++eq({dayselected}, 0)" x="{areawidth} - {areaheight}*4.0 + 2" y="{areaheight}*0.25+2" width="{areaheight}*0.5-4" height="{areaheight}*0.5-4" color="{tvgdayselected}" />
                <drawrectangle condition="{current}++eq({dayselected}, 1)" x="{areawidth} - {areaheight}*3.5 + 2" y="{areaheight}*0.25+2" width="{areaheight}*0.5-4" height="{areaheight}*0.5-4" color="{tvgdayselected}" />
                <drawrectangle condition="{current}++eq({dayselected}, 2)" x="{areawidth} - {areaheight}*3.0 + 2" y="{areaheight}*0.25+2" width="{areaheight}*0.5-4" height="{areaheight}*0.5-4" color="{tvgdayselected}" />
                <drawrectangle condition="{current}++eq({dayselected}, 3)" x="{areawidth} - {areaheight}*2.5 + 2" y="{areaheight}*0.25+2" width="{areaheight}*0.5-4" height="{areaheight}*0.5-4" color="{tvgdayselected}" />
                <drawrectangle condition="{current}++eq({dayselected}, 4)" x="{areawidth} - {areaheight}*2.0 + 2" y="{areaheight}*0.25+2" width="{areaheight}*0.5-4" height="{areaheight}*0.5-4" color="{tvgdayselected}" />
                <drawrectangle condition="{current}++eq({dayselected}, 5)" x="{areawidth} - {areaheight}*1.5 + 2" y="{areaheight}*0.25+2" width="{areaheight}*0.5-4" height="{areaheight}*0.5-4" color="{tvgdayselected}" />
                <drawrectangle condition="{current}++eq({dayselected}, 6)" x="{areawidth} - {areaheight}*1.0 + 2" y="{areaheight}*0.25+2" width="{areaheight}*0.5-4" height="{areaheight}*0.5-4" color="{tvgdayselected}" />

                <drawtext name="day0" x="{areawidth} - {areaheight}*4.0 + {areaheight}/4 - {width(day0)}/2" valign="center" font="{regular}" fontsize="50%" color="{fontdefault}" text="{day0abbr}" />
                <drawtext name="day1" x="{areawidth} - {areaheight}*3.5 + {areaheight}/4 - {width(day1)}/2" valign="center" font="{regular}" fontsize="50%" color="{fontdefault}" text="{day1abbr}" />
                <drawtext name="day2" x="{areawidth} - {areaheight}*3.0 + {areaheight}/4 - {width(day2)}/2" valign="center" font="{regular}" fontsize="50%" color="{fontdefault}" text="{day2abbr}" />
                <drawtext name="day3" x="{areawidth} - {areaheight}*2.5 + {areaheight}/4 - {width(day3)}/2" valign="center" font="{regular}" fontsize="50%" color="{fontdefault}" text="{day3abbr}" />
                <drawtext name="day4" x="{areawidth} - {areaheight}*2.0 + {areaheight}/4 - {width(day4)}/2" valign="center" font="{regular}" fontsize="50%" color="{fontdefault}" text="{day4abbr}" />
                <drawtext name="day5" x="{areawidth} - {areaheight}*1.5 + {areaheight}/4 - {width(day5)}/2" valign="center" font="{regular}" fontsize="50%" color="{fontdefault}" text="{day5abbr}" />
                <drawtext name="day6" x="{areawidth} - {areaheight}*1.0 + {areaheight}/4 - {width(day6)}/2" valign="center" font="{regular}" fontsize="50%" color="{fontdefault}" text="{day6abbr}" />
            </area>
        </areacontainer>
        <!-- Directory Selector -->
        <area condition="{directoryselector}" layer="6">
            <drawtext condition="not{current}" x="1%" valign="center" font="{regular}" fontsize="60%" color="{fontdefault}" text="{text}" />
            <drawtext condition="{current}" x="1%" valign="center" font="{regular}" fontsize="60%" color="{fontmenuactive}" text="{text}" />
            <drawimage imagetype="icon" path="ico_arrow_right" x="{areawidth} - {areaheight}*0.8" y="10%" width="{areaheight}*0.8" height="{areaheight}*0.8"/>
            <drawimage condition="not{current}" imagetype="icon" path="ico_arrow_right" x="{areawidth} - {areaheight}*0.8" y="10%" width="{areaheight}*0.8" height="{areaheight}*0.8"/>
            <drawimage condition="{current}" imagetype="icon" path="ico_arrow_right_active" x="{areawidth} - {areaheight}*0.8" y="10%" width="{areaheight}*0.8" height="{areaheight}*0.8"/>
            <drawtext condition="not{current}" name="folder" x="{areawidth} - {width(folder)} - {areaheight}" valign="center" font="{regular}" fontsize="60%" color="{fontdefault}" text="{folder}" />
            <drawimage condition="not{current}" imagetype="icon" path="ico_arrow_left" x="{areawidth} - {width(folder)} - 2*{areaheight}" y="10%" width="{areaheight}*0.8" height="{areaheight}*0.8"/>
            <drawtext condition="{current}" name="folderact" x="{areawidth} - {width(folderact)} - {areaheight}" valign="center" font="{regular}" fontsize="60%" color="{fontmenuactive}" text="{folder}" />
            <drawimage condition="{current}" imagetype="icon" path="ico_arrow_left_active" x="{areawidth} - {width(folderact)} - 2*{areaheight}" y="10%" width="{areaheight}*0.8" height="{areaheight}*0.8"/>
        </area>
        <!-- Timerconflict Header -->
        <areacontainer condition="{timerconflictheader}">
            <area layer="5">
                <drawtext name="title" x="{areawidth}*0.7*0.5 - {width(title)}/2" valign="center" font="{regular}" fontsize="50%" color="{fontdefault}" text="{text}" />
                <drawrectangle x="70%" y="0" width="30%" height="100%" color="{tvgconflictheaderback}"/>
            </area>
            <area layer="6">
                <drawtext x="{areawidth}*0.7" y="0" font="{regular}" fontsize="30%" color="{fontdefault}" text="{conflictstart}" />
                <drawtext align="right" y="0" font="{regular}" fontsize="30%" color="{fontdefault}" text="{conflictstop}" />
                <drawtext name="olstart" x="{areawidth}*0.7 + {overlapstartpercent}*{areawidth}*0.3/100 - {width(olstart)} - 5" y="50%" font="{regular}" fontsize="30%" color="{tvgconflictfont}" text="{overlapstart}" />
                <drawtext x="{areawidth}*0.7 + {overlapstartpercent}*{areawidth}*0.3/100 + {overlapwidthpercent}*{areawidth}*0.3/100 + 5" y="50%" font="{regular}" fontsize="30%" color="{tvgconflictfont}" text="{overlapstop}" />
                <drawrectangle x="{areawidth}*0.7 + {overlapstartpercent}*{areawidth}*0.3/100" y="50%" width="{overlapwidthpercent}*{areawidth}*0.3/100" height="50%" color="{tvgconflict}"/>
            </area>
        </areacontainer>
        <!-- Timerconflict -->
        <areacontainer condition="{timerconflict}">
            <area layer="5">
                <drawrectangle condition="{current}" x="0" y="0" width="70%" height="100%" color="{menubackactive}" />
                <drawrectangle condition="not{current}" x="0" y="{areaheight}-1" width="70%" height="1" color="{menubackline}" />
            </area>
            <area layer="6">
                <drawimage condition="{current}++{infoactive}" imagetype="icon" path="ico_info_selected" x="{areaheight}*0.05" valign="center" width="{areaheight}*0.5" height="{areaheight}*0.5"/>
                <drawimage condition="{current}++not{infoactive}" imagetype="icon" path="ico_info_active" x="{areaheight}*0.05" valign="center" width="{areaheight}*0.5" height="{areaheight}*0.5"/>
                <drawimage condition="not{current}" imagetype="icon" path="ico_info" x="{areaheight}*0.05" valign="center" width="{areaheight}*0.5" height="{areaheight}*0.5"/>
                
                <drawimage condition="{current}++{deleteactive}" imagetype="icon" path="ico_delete_selected" x="{areaheight}*0.6" valign="center" width="{areaheight}*0.5" height="{areaheight}*0.5"/>
                <drawimage condition="{current}++not{deleteactive}" imagetype="icon" path="ico_delete_active" x="{areaheight}*0.6" valign="center" width="{areaheight}*0.5" height="{areaheight}*0.5"/>
                <drawimage condition="not{current}" imagetype="icon" path="ico_delete" x="{areaheight}*0.6" valign="center" width="{areaheight}*0.5" height="{areaheight}*0.5"/>
                
                <drawimage condition="{current}++{editactive}" imagetype="icon" path="ico_edit_selected" x="{areaheight}*1.15" valign="center" width="{areaheight}*0.5" height="{areaheight}*0.5"/>
                <drawimage condition="{current}++not{editactive}" imagetype="icon" path="ico_edit_active" x="{areaheight}*1.15" valign="center" width="{areaheight}*0.5" height="{areaheight}*0.5"/>
                <drawimage condition="not{current}" imagetype="icon" path="ico_edit" x="{areaheight}*1.15" valign="center" width="{areaheight}*0.5" height="{areaheight}*0.5"/>
                
                <drawimage condition="{current}++{searchactive}" imagetype="icon" path="ico_search_selected" x="{areaheight}*1.7" valign="center" width="{areaheight}*0.5" height="{areaheight}*0.5"/>
                <drawimage condition="{current}++not{searchactive}" imagetype="icon" path="ico_search_active" x="{areaheight}*1.7" valign="center" width="{areaheight}*0.5" height="{areaheight}*0.5"/>
                <drawimage condition="not{current}" imagetype="icon" path="ico_search" x="{areaheight}*1.7" valign="center" width="{areaheight}*0.5" height="{areaheight}*0.5"/>

                <drawtext condition="not{current}" x="{areaheight}*2.3" width="{areawidth}*0.7 - {areaheight}*2.4" y="10%" font="{regular}" fontsize="35%" color="{fontdefault}" text="{timertitle}" />
                <drawtext condition="not{current}" x="{areaheight}*2.3" y="45%" font="{regular}" fontsize="25%" color="{fontdefault}" text="{weekday} {date} {starttime} - {stoptime}" />
                <drawtext condition="not{current}" x="{areaheight}*2.3" y="65%" font="{regular}" fontsize="25%" color="{fontdefault}" text="{channelname}, Transp. {transponder}" />

                <drawtext condition="{current}" x="{areaheight}*2.3" width="{areawidth}*0.7 - {areaheight}*2.4" y="10%" font="{regular}" fontsize="35%" color="{fontmenuactive}" text="{timertitle}" />
                <drawtext condition="{current}" x="{areaheight}*2.3" y="45%" font="{regular}" fontsize="25%" color="{fontmenuactive}" text="{weekday} {date} {starttime} - {stoptime}" />
                <drawtext condition="{current}" x="{areaheight}*2.3" y="65%" font="{regular}" fontsize="25%" color="{fontmenuactive}" text="{channelname}, Transp. {transponder}" />

                <drawrectangle x="70%" y="0" width="30%" height="100%" color="{tvgconflictheaderback}"/>
                <drawrectangle x="{areawidth}*0.7 + {timerstartpercent}*{areawidth}*0.3/100" y="30%" width="{timerwidthpercent}*{areawidth}*0.3/100" height="40%" color="{tvgconflicttimer}"/>
            </area>
            <area layer="7">
                <drawrectangle x="{areawidth}*0.7 + {overlapstartpercent}*{areawidth}*0.3/100" y="0" width="{overlapwidthpercent}*{areawidth}*0.3/100" height="100%" color="{tvgconflict}"/>
            </area>
        </areacontainer>
        <!-- Event -->
        <area condition="{event}" layer="6">
            <drawimage condition="{current}" imagetype="icon" path="ico_info_selected" x="{areaheight}*0.05" valign="center" width="{areaheight}*0.5" height="{areaheight}*0.5"/>
            <drawimage condition="not{current}" imagetype="icon" path="ico_info" x="{areaheight}*0.05" valign="center" width="{areaheight}*0.5" height="{areaheight}*0.5"/>
            <drawimage condition="{channellogoexisis}" imagetype="channellogo" path="{channelid}" x="{areaheight}*0.8" valign="center" width="{areaheight}" height="{areaheight}" />
            <drawtext condition="not{current}" x="{areaheight}*2.2" y="2" font="{regular}" fontsize="30%" color="{fontdefault}" text="{weekday} {date} {starttime} - {stoptime} {channelname}" />
            <drawtext condition="not{current}" x="{areaheight}*2.2" y="30%" width="{areawidth} - 3*{areaheight}" font="{regular}" fontsize="45%" color="{fontdefault}" text="{title}" />
            <drawtext condition="not{current}" x="{areaheight}*2.2" y="69%" width="{areawidth} - 3*{areaheight}" font="{regular}" fontsize="30%" color="{fontdefault}" text="{shorttext}" />
            <drawtext condition="{current}" x="{areaheight}*2.2" y="2" font="{regular}" fontsize="30%" color="{fontmenuactive}" text="{weekday} {date} {starttime} - {stoptime} {channelname}" />
            <drawtext condition="{current}" x="{areaheight}*2.2" y="30%" width="{areawidth} - 3*{areaheight}" font="{regular}" fontsize="45%" color="{fontmenuactive}" text="{title}" />
            <drawtext condition="{current}" x="{areaheight}*2.2" y="69%" width="{areawidth} - 3*{areaheight}" font="{regular}" fontsize="30%" color="{fontmenuactive}" text="{shorttext}" />
            <drawimage condition="{current}++not{hastimer}" imagetype="icon" path="ico_rec_active" x="{areawidth} - {areaheight}*0.6" valign="center" width="{areaheight}*0.5" height="{areaheight}*0.5"/>
            <drawimage condition="not{current}++not{hastimer}" imagetype="icon" path="ico_rec" x="{areawidth} - {areaheight}*0.6" valign="center" width="{areaheight}*0.5" height="{areaheight}*0.5"/>
            <drawimage condition="{hastimer}" imagetype="icon" path="ico_rec_selected" x="{areawidth} - {areaheight}*0.6" valign="center" width="{areaheight}*0.5" height="{areaheight}*0.5"/>
        </area>
        <!-- Recording -->
        <area condition="{recording}" layer="6">
            <drawtext condition="not{current}" x="1%" y="0" font="{regular}" width="98%" fontsize="50%" color="{fontdefault}" text="{recname}" />
            <drawtext condition="not{current}" x="55%" y="0" font="{regular}" width="98%" fontsize="35%" color="{fontdefault}" text="{recdate} {recstarttime} - {recduration} min, {channelname}" />
            <drawtext condition="{current}" x="1%" y="0" font="{regular}" width="98%" fontsize="50%" color="{fontmenuactive}" text="{recname}" />
            <drawtext condition="{current}" x="55%" y="0" font="{regular}" width="98%" fontsize="35%" color="{fontmenuactive}" text="{recdate} {recstarttime} - {recduration} min, {channelname}" />
        </area>
        <!-- Searchtimer -->
        <area condition="{searchtimer}" layer="6">
            <drawimage condition="{current}++{searchactive}" imagetype="icon" path="ico_search_selected" x="{areaheight}*0.05" valign="center" width="{areaheight}*0.5" height="{areaheight}*0.5"/>
            <drawimage condition="{current}++not{searchactive}" imagetype="icon" path="ico_search_active" x="{areaheight}*0.05" valign="center" width="{areaheight}*0.5" height="{areaheight}*0.5"/>
            <drawimage condition="not{current}" imagetype="icon" path="ico_search" x="{areaheight}*0.05" valign="center" width="{areaheight}*0.5" height="{areaheight}*0.5"/>

            <drawimage condition="{current}++{editactive}" imagetype="icon" path="ico_edit_selected" x="{areaheight}*0.6" valign="center" width="{areaheight}*0.5" height="{areaheight}*0.5"/>
            <drawimage condition="{current}++not{editactive}" imagetype="icon" path="ico_edit_active" x="{areaheight}*0.6" valign="center" width="{areaheight}*0.5" height="{areaheight}*0.5"/>
            <drawimage condition="not{current}" imagetype="icon" path="ico_edit" x="{areaheight}*0.6" valign="center" width="{areaheight}*0.5" height="{areaheight}*0.5"/>

            <drawimage condition="{current}++{deleteactive}" imagetype="icon" path="ico_delete_selected" x="{areaheight}*1.15" valign="center" width="{areaheight}*0.5" height="{areaheight}*0.5"/>
            <drawimage condition="{current}++not{deleteactive}" imagetype="icon" path="ico_delete_active" x="{areaheight}*1.15" valign="center" width="{areaheight}*0.5" height="{areaheight}*0.5"/>
            <drawimage condition="not{current}" imagetype="icon" path="ico_delete" x="{areaheight}*1.15" valign="center" width="{areaheight}*0.5" height="{areaheight}*0.5"/>

            <drawtext condition="not{current}" x="{areaheight}*1.8" width="{areawidth} - {areaheight}*2" y="5%" font="{regular}" fontsize="45%" color="{fontdefault}" text="{searchstring}" />
            <drawtext condition="not{current}++{timeractive}" align="right" y="5%" font="{regular}" fontsize="35%" color="{fontdefault}" text="active " />
            <drawtext condition="not{current}" x="{areaheight}*1.8" y="55%" font="{regular}" fontsize="35%" color="{fontdefault}" text="Active Timers: {activetimers}, Recordings: {recordingsdone}" />
            <drawtext condition="{current}" x="{areaheight}*1.8" width="{areawidth} - {areaheight}*2" y="5%" font="{regular}" fontsize="45%" color="{fontmenuactive}" text="{searchstring}" />
            <drawtext condition="{current}++{timeractive}" align="right" y="5%" font="{regular}" fontsize="35%" color="{fontmenuactive}" text="active " />
            <drawtext condition="{current}" x="{areaheight}*1.8" y="55%" font="{regular}" fontsize="35%" color="{fontmenuactive}" text="Active Timers: {activetimers}, Recordings: {recordingsdone}" />
        </area>
        <!-- Timeline Header -->
        <areacontainer condition="{timelineheader}">
            <area layer="5">
                <drawtext align="center" y="1%" font="{regular}" fontsize="30%" color="{fontdefault}" text="Timer {date}" />
                <drawrectangle x="{areawidth}*0.05" y="80%" width="{areawidth}*0.0375" height="20%" color="{tvgtimeline1}"/>
                <drawrectangle x="{areawidth}*0.0875" y="80%" width="{areawidth}*0.0375" height="20%" color="{tvgtimeline2}"/>
                <drawrectangle x="{areawidth}*0.125" y="80%" width="{areawidth}*0.0375" height="20%" color="{tvgtimeline1}"/>
                <drawrectangle x="{areawidth}*0.1625" y="80%" width="{areawidth}*0.0375" height="20%" color="{tvgtimeline2}"/>
                <drawrectangle x="{areawidth}*0.2" y="80%" width="{areawidth}*0.0375" height="20%" color="{tvgtimeline1}"/>
                <drawrectangle x="{areawidth}*0.2375" y="80%" width="{areawidth}*0.0375" height="20%" color="{tvgtimeline2}"/>
                <drawrectangle x="{areawidth}*0.275" y="80%" width="{areawidth}*0.0375" height="20%" color="{tvgtimeline1}"/>
                <drawrectangle x="{areawidth}*0.3125" y="80%" width="{areawidth}*0.0375" height="20%" color="{tvgtimeline2}"/>
                <drawrectangle x="{areawidth}*0.35" y="80%" width="{areawidth}*0.0375" height="20%" color="{tvgtimeline1}"/>
                <drawrectangle x="{areawidth}*0.3875" y="80%" width="{areawidth}*0.0375" height="20%" color="{tvgtimeline2}"/>
                <drawrectangle x="{areawidth}*0.425" y="80%" width="{areawidth}*0.0375" height="20%" color="{tvgtimeline1}"/>
                <drawrectangle x="{areawidth}*0.4625" y="80%" width="{areawidth}*0.0375" height="20%" color="{tvgtimeline2}"/>
                <drawrectangle x="{areawidth}*0.5" y="80%" width="{areawidth}*0.0375" height="20%" color="{tvgtimeline1}"/>
                <drawrectangle x="{areawidth}*0.5375" y="80%" width="{areawidth}*0.0375" height="20%" color="{tvgtimeline2}"/>
                <drawrectangle x="{areawidth}*0.575" y="80%" width="{areawidth}*0.0375" height="20%" color="{tvgtimeline1}"/>
                <drawrectangle x="{areawidth}*0.6125" y="80%" width="{areawidth}*0.0375" height="20%" color="{tvgtimeline2}"/>
                <drawrectangle x="{areawidth}*0.65" y="80%" width="{areawidth}*0.0375" height="20%" color="{tvgtimeline1}"/>
                <drawrectangle x="{areawidth}*0.6875" y="80%" width="{areawidth}*0.0375" height="20%" color="{tvgtimeline2}"/>
                <drawrectangle x="{areawidth}*0.725" y="80%" width="{areawidth}*0.0375" height="20%" color="{tvgtimeline1}"/>
                <drawrectangle x="{areawidth}*0.7625" y="80%" width="{areawidth}*0.0375" height="20%" color="{tvgtimeline2}"/>
                <drawrectangle x="{areawidth}*0.8" y="80%" width="{areawidth}*0.0375" height="20%" color="{tvgtimeline1}"/>
                <drawrectangle x="{areawidth}*0.8375" y="80%" width="{areawidth}*0.0375" height="20%" color="{tvgtimeline2}"/>
                <drawrectangle x="{areawidth}*0.875" y="80%" width="{areawidth}*0.0375" height="20%" color="{tvgtimeline1}"/>
                <drawrectangle x="{areawidth}*0.9125" y="80%" width="{areawidth}*0.0375" height="20%" color="{tvgtimeline2}"/>
            </area>
            <area layer="6">
                <drawtext name="text0" x="{areawidth}*0.05 + {areawidth}*0.0375/2 - {width(text0)}/2" y="80%" font="{regular}" fontsize="20%" color="{tvgtimeline2}" text="0"/>
                <drawtext name="text1" x="{areawidth}*0.0875 + {areawidth}*0.0375/2 - {width(text1)}/2" y="80%" font="{regular}" fontsize="20%" color="{tvgtimeline1}" text="1"/>
                <drawtext name="text2" x="{areawidth}*0.125 + {areawidth}*0.0375/2 - {width(text2)}/2" y="80%" font="{regular}" fontsize="20%" color="{tvgtimeline2}" text="2"/>
                <drawtext name="text3" x="{areawidth}*0.1625 + {areawidth}*0.0375/2 - {width(text3)}/2" y="80%" font="{regular}" fontsize="20%" color="{tvgtimeline1}" text="3"/>
                <drawtext name="text4" x="{areawidth}*0.2 + {areawidth}*0.0375/2 - {width(text4)}/2" y="80%" font="{regular}" fontsize="20%" color="{tvgtimeline2}" text="4"/>
                <drawtext name="text5" x="{areawidth}*0.2375 + {areawidth}*0.0375/2 - {width(text5)}/2" y="80%" font="{regular}" fontsize="20%" color="{tvgtimeline1}" text="5"/>
                <drawtext name="text6" x="{areawidth}*0.275 + {areawidth}*0.0375/2 - {width(text6)}/2" y="80%" font="{regular}" fontsize="20%" color="{tvgtimeline2}" text="6"/>
                <drawtext name="text7" x="{areawidth}*0.3125 + {areawidth}*0.0375/2 - {width(text7)}/2" y="80%" font="{regular}" fontsize="20%" color="{tvgtimeline1}" text="7"/>
                <drawtext name="text8" x="{areawidth}*0.35 + {areawidth}*0.0375/2 - {width(text8)}/2" y="80%" font="{regular}" fontsize="20%" color="{tvgtimeline2}" text="8"/>
                <drawtext name="text9" x="{areawidth}*0.3875 + {areawidth}*0.0375/2 - {width(text9)}/2" y="80%" font="{regular}" fontsize="20%" color="{tvgtimeline1}" text="9"/>
                <drawtext name="text10" x="{areawidth}*0.425 + {areawidth}*0.0375/2 - {width(text10)}/2" y="80%" font="{regular}" fontsize="20%" color="{tvgtimeline2}" text="10"/>
                <drawtext name="text11" x="{areawidth}*0.4625 + {areawidth}*0.0375/2 - {width(text11)}/2" y="80%" font="{regular}" fontsize="20%" color="{tvgtimeline1}" text="11"/>
                <drawtext name="text12" x="{areawidth}*0.5 + {areawidth}*0.0375/2 - {width(text12)}/2" y="80%" font="{regular}" fontsize="20%" color="{tvgtimeline2}" text="12"/>
                <drawtext name="text13" x="{areawidth}*0.5375 + {areawidth}*0.0375/2 - {width(text13)}/2" y="80%" font="{regular}" fontsize="20%" color="{tvgtimeline1}" text="13"/>
                <drawtext name="text14" x="{areawidth}*0.575 + {areawidth}*0.0375/2 - {width(text14)}/2" y="80%" font="{regular}" fontsize="20%" color="{tvgtimeline2}" text="14"/>
                <drawtext name="text15" x="{areawidth}*0.6125 + {areawidth}*0.0375/2 - {width(text15)}/2" y="80%" font="{regular}" fontsize="20%" color="{tvgtimeline1}" text="15"/>
                <drawtext name="text16" x="{areawidth}*0.65 + {areawidth}*0.0375/2 - {width(text16)}/2" y="80%" font="{regular}" fontsize="20%" color="{tvgtimeline2}" text="16"/>
                <drawtext name="text17" x="{areawidth}*0.6875 + {areawidth}*0.0375/2 - {width(text17)}/2" y="80%" font="{regular}" fontsize="20%" color="{tvgtimeline1}" text="17"/>
                <drawtext name="text18" x="{areawidth}*0.725 + {areawidth}*0.0375/2 - {width(text18)}/2" y="80%" font="{regular}" fontsize="20%" color="{tvgtimeline2}" text="18"/>
                <drawtext name="text19" x="{areawidth}*0.7625 + {areawidth}*0.0375/2 - {width(text19)}/2" y="80%" font="{regular}" fontsize="20%" color="{tvgtimeline1}" text="19"/>
                <drawtext name="text20" x="{areawidth}*0.8 + {areawidth}*0.0375/2 - {width(text20)}/2" y="80%" font="{regular}" fontsize="20%" color="{tvgtimeline2}" text="20"/>
                <drawtext name="text21" x="{areawidth}*0.8375 + {areawidth}*0.0375/2 - {width(text21)}/2" y="80%" font="{regular}" fontsize="20%" color="{tvgtimeline1}" text="21"/>
                <drawtext name="text22" x="{areawidth}*0.875 + {areawidth}*0.0375/2 - {width(text22)}/2" y="80%" font="{regular}" fontsize="20%" color="{tvgtimeline2}" text="22"/>
                <drawtext name="text23" x="{areawidth}*0.9125 + {areawidth}*0.0375/2 - {width(text23)}/2" y="80%" font="{regular}" fontsize="20%" color="{tvgtimeline1}" text="23"/>
            </area>
            <area condition="{timerset}" layer="6">
                 <drawimage condition="{channellogoexisis}" imagetype="channellogo" path="{channelid}" x="1%" y="30%" width="{areaheight}*0.5" height="{areaheight}*0.5" />
                 <drawtext condition="not{channellogoexisis}" x="1%" width="{areaheight}*0.7" y="40%" font="{regular}" fontsize="20%" color="{fontdefault}" text="{channelname}"/>
                 <drawtext x="{areaheight}*0.8" y="36%" font="{regular}" fontsize="20%" color="{fontdefault}" text="{eventstart} - {eventstop} (Rec. {timerstart} - {timerstop}), Transp. {channeltransponder}"/>
                 <drawtext x="{areaheight}*0.8" y="54%" width="{areawidth}-{areaheight}" font="{regular}" fontsize="20%" color="{fontdefault}" text="{eventtitle} - {eventshorttext}"/>
            </area>
        </areacontainer>
        <!-- Timeline Timer -->
        <areacontainer condition="{timelinetimer}">
            <area layer="5">
                <drawrectangle condition="{current}" x="5%" y="0" width="90%" height="100%" color="{menubackactive}"/>
                <drawrectangle x="5%" y="{areaheight}-1" width="90%" height="1" color="{menubackline}"/>
            </area>
            <area layer="6">
                <drawrectangle condition="not{current}" x="{areawidth}*0.05 + {timerstart}*{areawidth}*0.9/1000" y="25%" width="{timerwidth}*{areawidth}*0.9/1000" height="50%" color="{fontmenuactive}"/>
                <drawrectangle condition="{current}" x="{areawidth}*0.05 + {timerstart}*{areawidth}*0.9/1000" y="25%" width="{timerwidth}*{areawidth}*0.9/1000" height="50%" color="{fontdefault}"/>
            </area>
        </areacontainer>
        <!-- Favorites -->
        <area condition="{favorite}" layer="6">
            <drawimage condition="{current}" imagetype="icon" path="ico_search_selected" x="{areaheight}*0.1" valign="center" width="{areaheight}*0.5" height="{areaheight}*0.5"/>
            <drawimage condition="not{current}" imagetype="icon" path="ico_search" x="{areaheight}*0.1" valign="center" width="{areaheight}*0.5" height="{areaheight}*0.5"/>
            <drawtext condition="not{current}" x="{areaheight}" valign="center" font="{regular}" width="{areawidth} - {areaheight}" fontsize="80%" color="{fontdefault}" text="{favdesc}" />
            <drawtext condition="not{current}" x="{areaheight}" valign="center" font="{regular}" width="{areawidth} - {areaheight}" fontsize="80%" color="{fontdefault}" text="{favdesc}" />
            <drawtext condition="{current}" x="{areaheight}" valign="center" font="{regular}" width="{areawidth} - {areaheight}" fontsize="80%" color="{fontmenuactive}" text="{favdesc}" />
            <drawtext condition="{current}" x="{areaheight}" valign="center" font="{regular}" width="{areawidth} - {areaheight}" fontsize="80%" color="{fontmenuactive}" text="{favdesc}" />
        </area>
    </grid>
</displayplugin>
