DVD: Move summary screens to XML files
authorMike Looijmans <milo-software@users.sourceforge.net>
Sun, 15 Jan 2012 16:18:04 +0000 (17:18 +0100)
committerMike Looijmans <milo-software@users.sourceforge.net>
Sun, 15 Jan 2012 16:22:30 +0000 (17:22 +0100)
And make them auto-scaling, and look more like others.

data/skin_display.xml
data/skin_display96.xml
data/skin_text.xml
lib/python/Screens/DVD.py

index 28a1313..82f8641 100644 (file)
                </panel>
        </screen>
 
+<!-- DVD -->
+       <screen name="DVDSummary" position="fill">
+               <widget source="session.CurrentService" render="Label" position="top" size="*,28" font="FdLcD;12"  >
+                       <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="fill">
+                       <widget source="session.CurrentService" render="Label" position="left" size="60,*" font="FdLcD;12" halign="left" >
+                               <convert type="ServicePosition">Position</convert>
+                       </widget>
+                       <widget name="Chapter" position="fill" font="FdLcD;12" halign="left" />
+               </panel>
+       </screen>
+
 <!-- setup-->
        <screen name="SetupSummary" position="fill">
                <widget source="SetupTitle" render="Label" position="top" size="*,12" font="FdLcD;12" halign="left" />
index 10b3b03..c0d473b 100755 (executable)
                </widget>
        </screen>
 
+<!-- DVD Player -->
+       <screen name="DVDSummary" position="0,0" size="96,64">
+               <widget source="session.CurrentService" render="Label" position="0,0" size="96,25" font="FdLcD;12" transparent="1" >
+                       <convert type="ServiceName">Name</convert>
+               </widget>
+               <widget name="Chapter" position="0,40" size="66,12" font="FdLcD;10" transparent="1" halign="left" />
+               <widget source="session.CurrentService" render="Label" position="66,40" size="30,12" font="FdLcD;10" transparent="1" halign="right" >
+                       <convert type="ServicePosition">Position</convert>
+               </widget>
+               <widget source="session.CurrentService" render="Progress" position="0,52" size="96,12" borderWidth="1" >
+                       <convert type="ServicePosition">Position</convert>
+               </widget>
+       </screen>
+
 <!-- setup-->
        <screen name="SetupSummary" position="0,0" size="96,64">
                <widget source="SetupTitle" render="Label" position="0,0" size="96,12" font="FdLcD;12" halign="left" foregroundColor="lightyellow" />
index ece3b88..68c47b2 100755 (executable)
                <widget source="name" render="Label" position="0,0" size="124,32" font="Regular;16" halign="left" valign="top" />
        </screen>
 
+<!-- DVD -->
+       <screen name="DVDSummary" position="0,0" size="132,1">
+               <widget source="session.CurrentService" render="Label" position="0,0" size="60,1" font="Regular;16">
+                       <convert type="ServicePosition">Position</convert>
+               </widget>
+       </screen>
+
 <!-- setup-->
        <screen name="SetupSummary" position="0,0" size="132,64">
                <widget source="SetupEntry" render="Label" position="0,0" size="120,40" font="Regular;12" halign="left" />
index 212ad9f..b1f9468 100644 (file)
@@ -18,38 +18,8 @@ from Components.Harddisk import harddiskmanager
 lastpath = ""
 
 class DVDSummary(Screen):
-       skin = (
-       """<screen name="DVDSummary" position="0,0" size="132,64" id="1">
-               <widget source="session.CurrentService" render="Label" position="5,4" size="120,28" font="Regular;12" transparent="1" >
-                       <convert type="ServiceName">Name</convert>
-               </widget>
-               <widget name="DVDPlayer" position="5,30" size="66,16" font="Regular;11" transparent="1" />
-               <widget name="Chapter" position="72,30" size="54,16" font="Regular;12" transparent="1" halign="right" />
-               <widget source="session.CurrentService" render="Label" position="66,46" size="60,18" font="Regular;16" transparent="1" halign="right" >
-                       <convert type="ServicePosition">Position</convert>
-               </widget>
-               <widget source="session.CurrentService" render="Progress" position="6,46" size="60,18" borderWidth="1" >
-                       <convert type="ServicePosition">Position</convert>
-               </widget>
-       </screen>""",
-       """<screen name="DVDSummary" position="0,0" size="96,64" id="2">
-               <widget source="session.CurrentService" render="Label" position="0,0" size="96,25" font="Regular;12" transparent="1" >
-                       <convert type="ServiceName">Name</convert>
-               </widget>
-               <widget name="DVDPlayer" position="0,26" size="96,12" font="Regular;10" transparent="1" />
-               <widget name="Chapter" position="0,40" size="66,12" font="Regular;10" transparent="1" halign="left" />
-               <widget source="session.CurrentService" render="Label" position="66,40" size="30,12" font="Regular;10" transparent="1" halign="right" >
-                       <convert type="ServicePosition">Position</convert>
-               </widget>
-               <widget source="session.CurrentService" render="Progress" position="0,52" size="96,12" borderWidth="1" >
-                       <convert type="ServicePosition">Position</convert>
-               </widget>
-       </screen>""")
-
        def __init__(self, session, parent):
                Screen.__init__(self, session, parent)
-
-               self["DVDPlayer"] = Label("DVD Player")
                self["Title"] = Label("")
                self["Time"] = Label("")
                self["Chapter"] = Label("")