Add box-specific display support, in particular vuduo2
authorMike Looijmans <milo-software@users.sourceforge.net>
Sun, 11 Aug 2013 08:14:12 +0000 (10:14 +0200)
committerMike Looijmans <milo-software@users.sourceforge.net>
Sun, 11 Aug 2013 08:48:35 +0000 (10:48 +0200)
When a skin_display_(boxtype).xml exists, use that instead of the
default one. Create a bit of a vfd skin for the vuduo2 (which has
a 140x32 sized vfd).

Could be replaced with a "displayname" configure parameter, so
that a display skin is chosen based on machine features. Then the
--with-textlcd and similar options can be dropped.

data/Makefile.am
data/skin_display_default.xml [copied from data/skin_display.xml with 100% similarity]
data/skin_display_vuduo2.xml [moved from data/skin_display.xml with 83% similarity]

index b434304..3b7a3cb 100644 (file)
@@ -26,3 +26,6 @@ else
 dist_pkgdata_DATA += skin_display.xml
 endif
 endif
+
+skin_display.xml: skin_display_default.xml
+       test -f skin_display_$(BOXTYPE).xml && cp skin_display_$(BOXTYPE).xml skin_display.xml || cp skin_display_default.xml skin_display.xml
similarity index 83%
rename from data/skin_display.xml
rename to data/skin_display_vuduo2.xml
index caed5b2..1b20e23 100644 (file)
        <fonts>
                <!-- pick a funky name for the font, so we don't conflict  -->
                <font filename="nmsbd.ttf" name="FdLcD" scale="90"/>
+               <alias name="Huge" font="Regular" size="32" height="32" />
+               <alias name="Big" font="Regular" size="16" height="16" />
+               <alias name="Medium" font="Regular" size="12" height="12" />
+               <alias name="Small" font="Regular" size="10" height="10" />
        </fonts>
 
 <!-- template -->
        <screen name="SummaryClockPanel">
-               <widget source="global.CurrentTime" render="Label" position="right" size="60,*" font="FdLcD;24" halign="right" valign="top" noWrap="1">
+               <widget source="global.CurrentTime" render="Label" position="right" size="60,*" font="Medium" halign="right" valign="top" noWrap="1">
                        <convert type="ClockToText"></convert>
                </widget>
-               <widget source="session.RecordState" render="FixedLabel" text="Rec" position="4,12" size="24,12" font="FdLcD;12" zPosition="1" noWrap="1">
+               <widget source="session.RecordState" render="FixedLabel" text="Rec" position="4,12" size="24,12" font="Small" zPosition="1" noWrap="1">
                        <convert type="ConditionalShowHide">Blink</convert>
                </widget>
        </screen>
 
 <!-- main-->
        <screen name="InfoBarSummary" position="fill">
-               <widget source="session.CurrentService" render="Label" position="top" size="*,21" font="FdLcD;20" halign="left" noWrap="1">
+               <widget source="session.CurrentService" render="Label" position="top" size="*,16" font="Big" halign="left" noWrap="1">
                        <convert type="ServiceName">Name</convert>
                </widget>
-               <widget source="session.Event_Now" render="Label" position="top" size="*,15" font="FdLcD;14" halign="left" noWrap="1">
-                       <convert type="EventName">Name</convert>
-               </widget>
                <widget source="session.Event_Now" render="Progress" position="top" size="*,4" borderWidth="1" >
                        <convert type="EventTime">Progress</convert>
                </widget>
-               <panel position="bottom" size="*,24" name="SummaryClockPanel">
-                       <widget source="session.Event_Now" render="Label" position="4,0" size="40,12" font="FdLcD;12" halign="left" noWrap="1">
+               <panel position="bottom" size="*,12" name="SummaryClockPanel">
+                       <widget source="session.Event_Now" render="Label" position="4,0" size="40,12" font="Small" halign="left" noWrap="1">
                                <convert type="EventTime">Remaining</convert>
                                <convert type="RemainingToText">NoSeconds</convert>
                        </widget>
   
 <!-- channelselection-->
        <screen name="ChannelSelection_summary" position="fill">
-               <widget source="parent.ServiceEvent" render="Label" position="top" size="*,21" font="FdLcD;20" halign="left" noWrap="1" >
+               <widget source="parent.ServiceEvent" render="Label" position="top" size="*,16" font="Big" halign="left" noWrap="1" >
                        <convert type="ServiceName">Name</convert>
                </widget>
-               <widget source="parent.ServiceEvent" render="Label" position="top" size="*,15" font="FdLcD;14" halign="left" noWrap="1">
+               <widget source="parent.ServiceEvent" render="Label" position="top" size="*,12" font="Small" halign="left" noWrap="1">
                        <convert type="EventName">Name</convert>
                </widget>
                <widget source="parent.ServiceEvent" render="Progress" position="top" size="*,4" borderWidth="1">
                        <convert type="EventTime">Progress</convert>
                </widget>
-               <panel position="bottom" size="*,24" name="SummaryClockPanel" />
        </screen>
   
 <!-- menus-->
        <screen name="MenuSummary" position="fill">
-               <widget source="parent.title" render="Label" position="top" size="*,16" font="FdLcD;14" halign="center" valign="top" noWrap="1" />
-               <widget source="parent.menu" render="Label" position="top" size="*,48" font="FdLcD;16" halign="left" valign="top">
+               <widget source="parent.title" render="Label" position="top" size="*,12" font="Medium" halign="center" valign="top" noWrap="1" />
+               <widget source="parent.menu" render="Label" position="fill" font="Small" halign="left" valign="top">
                        <convert type="StringListSelection" />
                </widget>
        </screen>
 
 <!-- movieplayer-->
        <screen name="InfoBarMoviePlayerSummary" position="fill">
-               <widget source="session.CurrentService" render="Label" position="top" size="*,36" font="FdLcD;16" halign="left" valign="top" >
+               <widget source="session.CurrentService" render="Label" position="top" size="*,12" font="Medium" halign="left" valign="top" >
                        <convert type="ServiceName">Name</convert>
                </widget>
                <widget source="session.CurrentService" render="Progress" position="top" size="*,4" borderWidth="1">
                        <convert type="ServicePosition">Position</convert>
                </widget>
-               <panel position="bottom" size="*,24" name="SummaryClockPanel">
-                       <widget source="session.CurrentService" render="Label" position="4,0" size="42,12" font="FdLcD;12" halign="left" noWrap="1">
+               <panel position="bottom" size="*,12" name="SummaryClockPanel">
+                       <widget source="session.CurrentService" render="Label" position="left" size="42,12" font="Small" halign="left" noWrap="1">
                                <convert type="ServicePosition">Position</convert>
                        </widget>
                </panel>
 
 <!-- setup-->
        <screen name="SetupSummary" position="fill">
-               <widget source="SetupTitle" render="Label" position="top" size="*,12" font="FdLcD;12" halign="left" />
-               <widget source="SetupEntry" render="Label" position="top" size="*,40" font="FdLcD;12" halign="left" />
-               <widget source="SetupValue" render="Label" position="top" size="*,12" font="FdLcD;12" halign="left" />
+               <widget source="SetupTitle" render="Label" position="top" size="*,10" font="Small" halign="left" />
+               <widget source="SetupEntry" render="Label" position="top" size="*,12" font="Medium" halign="left" />
+               <widget source="SetupValue" render="Label" position="top" size="*,10" font="Small" halign="left" />
        </screen>
 
 <!-- misc-->
 
 <!-- standby -->
        <screen name="StandbySummary" position="fill">
-               <widget source="global.CurrentTime" render="Label" position="center,0" size="120,64" font="FdLcD;48" halign="center" valign="center" noWrap="1">
-                       <convert type="ClockToText"></convert>
-               </widget>
-               <widget source="session.RecordState" render="FixedLabel" text="Recording" position="4,50" size="120,12" font="FdLcD;12" zPosition="2" valign="bottom" halign="left" noWrap="1">
-                       <convert type="ConditionalShowHide"></convert>
-               </widget>
+               <panel position="fill" layout="stack">
+                       <widget source="global.CurrentTime" render="Label" position="fill" font="Huge" halign="center" valign="center" noWrap="1">
+                               <convert type="ClockToText"></convert>
+                       </widget>
+                       <widget source="session.RecordState" render="FixedLabel" text="Recording" position="bottom" size="*,10" font="Small" zPosition="2" valign="bottom" halign="left" noWrap="1">
+                               <convert type="ConditionalShowHide"></convert>
+                       </widget>
+               </panel>
        </screen>
 <!-- Plugin browser -->
        <screen name="PluginBrowserSummary" position="fill">