Skip to content

Commit

Permalink
[ViX-plugin] simplify embedded skins
Browse files Browse the repository at this point in the history
  • Loading branch information
Huevos committed Feb 10, 2024
1 parent 425feaf commit dc70cf1
Show file tree
Hide file tree
Showing 8 changed files with 19 additions and 182 deletions.
35 changes: 3 additions & 32 deletions lib/python/Plugins/SystemPlugins/ViX/BackupManager.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,12 +139,7 @@ def BackupManagerautostart(reason, session=None, **kwargs):

class VIXBackupManager(Screen):
skin = ["""<screen name="VIXBackupManager" position="center,center" size="%d,%d">
<ePixmap pixmap="skin_default/buttons/red.png" position="%d,%d" size="%d,%d" alphatest="blend" scale="1" />
<ePixmap pixmap="skin_default/buttons/green.png" position="%d,%d" size="%d,%d" alphatest="blend" scale="1" />
<ePixmap pixmap="skin_default/buttons/yellow.png" position="%d,%d" size="%d,%d" alphatest="blend" scale="1" />
<widget name="key_red" position="%d,%d" zPosition="1" size="%d,%d" font="Regular;%d" halign="center" valign="center" backgroundColor="#9f1313" transparent="1" />
<widget name="key_green" position="%d,%d" zPosition="1" size="%d,%d" font="Regular;%d" halign="center" valign="center" backgroundColor="#1f771f" transparent="1" />
<widget name="key_yellow" position="%d,%d" zPosition="1" size="%d,%d" font="Regular;%d" halign="center" valign="center" backgroundColor="#a08500" transparent="1" />
<panel name="__DynamicColorButtonTemplate__"/>
<ePixmap pixmap="skin_default/buttons/key_menu.png" position="%d,%d" size="%d,%d" alphatest="blend" transparent="1" zPosition="3" scale="1" />
<ePixmap pixmap="skin_default/buttons/key_info.png" position="%d,%d" size="%d,%d" alphatest="blend" transparent="1" zPosition="3" scale="1" />
<widget name="lab1" position="%d,%d" size="%d,%d" font="Regular; %d" zPosition="2" transparent="0" halign="center"/>
Expand All @@ -155,12 +150,6 @@ class VIXBackupManager(Screen):
</applet>
</screen>""",
560, 400, # screen
0, 0, 140, 40, # colors
140, 0, 140, 40,
280, 0, 140, 40,
0, 0, 140, 40, 20,
140, 0, 140, 40, 20,
280, 0, 140, 40, 20,
0, 45, 35, 25, # menu key
40, 45, 35, 25, # info key
0, 50, 560, 50, 18, # lab1
Expand Down Expand Up @@ -760,21 +749,10 @@ def Stage6(self, result=None, retval=None, extra_args=None):
class BackupSelection(Screen):
skin = ["""
<screen name="BackupSelection" position="center,center" size="%d,%d">
<ePixmap pixmap="skin_default/buttons/red.png" position="%d,%d" size="%d,%d" alphatest="blend" scale="1"/>
<ePixmap pixmap="skin_default/buttons/green.png" position="%d,%d" size="%d,%d" alphatest="blend" scale="1"/>
<ePixmap pixmap="skin_default/buttons/yellow.png" position="%d,%d" size="%d,%d" alphatest="blend" scale="1"/>
<widget source="key_red" render="Label" position="%d,%d" zPosition="1" size="%d,%d" font="Regular;%d" halign="center" valign="center" backgroundColor="#9f1313" transparent="1"/>
<widget source="key_green" render="Label" position="%d,%d" zPosition="1" size="%d,%d" font="Regular;%d" halign="center" valign="center" backgroundColor="#1f771f" transparent="1"/>
<widget source="key_yellow" render="Label" position="%d,%d" zPosition="1" size="%d,%d" font="Regular;%d" halign="center" valign="center" backgroundColor="#a08500" transparent="1"/>
<panel name="__DynamicColorButtonTemplate__"/>
<widget name="checkList" position="%d,%d" size="%d,%d" itemHeight="%d" font="Regular;%d" transparent="1" scrollbarMode="showOnDemand"/>
</screen>""",
560, 400, # screen
0, 0, 140, 40, # colors
140, 0, 140, 40,
280, 0, 140, 40,
0, 0, 140, 40, 20,
140, 0, 140, 40, 20,
280, 0, 140, 40, 20,
5, 50, 550, 250, 25, 19,
] # noqa: E124

Expand Down Expand Up @@ -862,17 +840,10 @@ def closeRecursive(self):
class XtraPluginsSelection(Screen):
skin = ["""
<screen name="BackupSelection" position="center,center" size="%d,%d">
<ePixmap pixmap="skin_default/buttons/red.png" position="%d,%d" size="%d,%d" alphatest="blend" scale="1"/>
<ePixmap pixmap="skin_default/buttons/green.png" position="%d,%d" size="%d,%d" alphatest="blend" scale="1"/>
<widget source="key_red" render="Label" position="%d,%d" zPosition="1" size="%d,%d" font="Regular;%d" halign="center" valign="center" backgroundColor="#9f1313" transparent="1"/>
<widget source="key_green" render="Label" position="%d,%d" zPosition="1" size="%d,%d" font="Regular;%d" halign="center" valign="center" backgroundColor="#1f771f" transparent="1"/>
<panel name="__DynamicColorButtonTemplate__"/>
<widget name="checkList" position="%d,%d" size="%d,%d" itemHeight="%d" font="Regular;%d" transparent="1" scrollbarMode="showOnDemand"/>
</screen>""",
560, 400, # screen
0, 0, 140, 40, # red
140, 0, 140, 40, # green
0, 0, 140, 40, 20, # red
140, 0, 140, 40, 20, # green
5, 50, 550, 250, 25, 19,
] # noqa: E124

Expand Down
30 changes: 2 additions & 28 deletions lib/python/Plugins/SystemPlugins/ViX/IPKInstaller.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,25 +18,14 @@
class VIXIPKInstaller(Screen):
skin = ["""
<screen name="VIXIPKInstaller" position="center,center" size="%d,%d">
<ePixmap pixmap="skin_default/buttons/red.png" position="%d,%d" size="%d,%d" alphatest="blend" scale="1"/>
<ePixmap pixmap="skin_default/buttons/green.png" position="%d,%d" size="%d,%d" alphatest="blend" scale="1"/>
<ePixmap pixmap="skin_default/buttons/yellow.png" position="%d,%d" size="%d,%d" alphatest="blend" scale="1"/>
<widget name="key_red" position="%d,%d" zPosition="1" size="%d,%d" font="Regular;%d" halign="center" valign="center" backgroundColor="#9f1313" transparent="1"/>
<widget name="key_green" position="%d,%d" zPosition="1" size="%d,%d" font="Regular;%d" halign="center" valign="center" backgroundColor="#1f771f" transparent="1"/>
<widget name="key_yellow" position="%d,%d" zPosition="1" size="%d,%d" font="Regular;%d" halign="center" valign="center" backgroundColor="#a08500" transparent="1"/>
<panel name="__DynamicColorButtonTemplate__"/>
<widget name="lab1" position="%d,%d" size="%d,%d" font="Regular; %d" zPosition="2" transparent="0" halign="center"/>
<widget name="list" position="%d,%d" size="%d,%d" font="Regular;%d" scrollbarMode="showOnDemand"/>
<applet type="onLayoutFinish">
self["list"].instance.setItemHeight(%d)
</applet>
</screen>""",
560, 400, # screen
0, 0, 140, 40, # colors
140, 0, 140, 40,
280, 0, 140, 40,
0, 0, 140, 40, 20,
140, 0, 140, 40, 20,
280, 0, 140, 40, 20,
0, 50, 560, 50, 18, # lab1
10, 105, 540, 260, 20, # list
26,
Expand Down Expand Up @@ -165,27 +154,12 @@ def myclose(self):
class IpkgInstaller(Screen):
skin = ["""
<screen name="IpkgInstaller" position="center,center" size="%d,%d">
<ePixmap pixmap="skin_default/buttons/red.png" position="%d,%d" size="%d,%d" alphatest="blend" scale="1"/>
<ePixmap pixmap="skin_default/buttons/green.png" position="%d,%d" size="%d,%d" alphatest="blend" scale="1"/>
<ePixmap pixmap="skin_default/buttons/yellow.png" position="%d,%d" size="%d,%d" alphatest="blend" scale="1"/>
<ePixmap pixmap="skin_default/buttons/blue.png" position="%d,%d" size="%d,%d" alphatest="blend" scale="1"/>
<widget source="key_red" render="Label" position="%d,%d" zPosition="1" size="%d,%d" font="Regular;%d" halign="center" valign="center" backgroundColor="#9f1313" transparent="1"/>
<widget source="key_green" render="Label" position="%d,%d" zPosition="1" size="%d,%d" font="Regular;%d" halign="center" valign="center" backgroundColor="#1f771f" transparent="1"/>
<widget source="key_yellow" render="Label" position="%d,%d" zPosition="1" size="%d,%d" font="Regular;%d" halign="center" valign="center" backgroundColor="#a08500" transparent="1"/>
<widget source="key_blue" render="Label" position="%d,%d" zPosition="1" size="%d,%d" font="Regular;%d" halign="center" valign="center" backgroundColor="#18188b" transparent="1"/>
<panel name="__DynamicColorButtonTemplate__"/>
<widget name="list" position="%d,%d" size="%d,%d" font="Regular;%d"/>
<ePixmap pixmap="skin_default/div-h.png" position="%d,%d" zPosition="10" size="%d,%d" transparent="1" alphatest="blend" scale="1"/>
<widget source="introduction" render="Label" position="%d,%d" zPosition="10" size="%d,%d" halign="center" valign="center" font="Regular;%d" transparent="1" shadowColor="black" shadowOffset="-1,-1"/>
</screen>""",
560, 450, # screen
0, 0, 140, 40, # colors
140, 0, 140, 40,
280, 0, 140, 40,
420, 0, 140, 40,
0, 0, 140, 40, 20,
140, 0, 140, 40, 20,
280, 0, 140, 40, 20,
420, 0, 140, 40, 20,
5, 50, 540, 360, 20, # list
0, 410, 560, 2,
5, 420, 550, 30, 22,
Expand Down
50 changes: 2 additions & 48 deletions lib/python/Plugins/SystemPlugins/ViX/ImageManager.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,14 +134,7 @@ class tmp:

class VIXImageManager(Screen):
skin = ["""<screen name="VIXImageManager" position="center,center" size="%d,%d">
<ePixmap pixmap="skin_default/buttons/red.png" position="%d,%d" size="%d,%d" alphatest="blend" scale="1"/>
<ePixmap pixmap="skin_default/buttons/green.png" position="%d,%d" size="%d,%d" alphatest="blend" scale="1"/>
<ePixmap pixmap="skin_default/buttons/yellow.png" position="%d,%d" size="%d,%d" alphatest="blend" scale="1"/>
<ePixmap pixmap="skin_default/buttons/blue.png" position="%d,%d" size="%d,%d" alphatest="blend" scale="1"/>
<widget name="key_red" position="%d,%d" zPosition="1" size="%d,%d" font="Regular;%d" halign="center" valign="center" backgroundColor="#9f1313" transparent="1"/>
<widget name="key_green" position="%d,%d" zPosition="1" size="%d,%d" font="Regular;%d" halign="center" valign="center" backgroundColor="#1f771f" transparent="1"/>
<widget name="key_yellow" position="%d,%d" zPosition="1" size="%d,%d" font="Regular;%d" halign="center" valign="center" backgroundColor="#a08500" transparent="1"/>
<widget name="key_blue" position="%d,%d" zPosition="1" size="%d,%d" font="Regular;%d" halign="center" valign="center" backgroundColor="#18188b" transparent="1"/>
<panel name="__DynamicColorButtonTemplate__"/>
<ePixmap pixmap="skin_default/buttons/key_menu.png" position="%d,%d" size="%d,%d" alphatest="blend" transparent="1" zPosition="3" scale="1" />
<widget name="lab1" position="%d,%d" size="%d,%d" font="Regular; %d" zPosition="2" transparent="0" halign="center"/>
<widget name="list" position="%d,%d" size="%d,%d" font="Regular;%d" scrollbarMode="showOnDemand"/>
Expand All @@ -151,14 +144,6 @@ class VIXImageManager(Screen):
</applet>
</screen>""",
560, 400, # screen
0, 0, 140, 40, # colors
140, 0, 140, 40,
280, 0, 140, 40,
420, 0, 140, 40,
0, 0, 140, 40, 20,
140, 0, 140, 40, 20,
280, 0, 140, 40, 20,
420, 0, 140, 40, 20,
0, 45, 35, 25, # menu key
0, 50, 560, 50, 18, # lab1
10, 105, 540, 260, 20, # list
Expand Down Expand Up @@ -873,29 +858,14 @@ def doBackup(self, answer):
class ImageBackup(Screen):
skin = ["""
<screen name="VIXImageManager" position="center,center" size="%d,%d">
<ePixmap pixmap="skin_default/buttons/red.png" position="%d,%d" size="%d,%d" alphatest="blend" scale="1"/>
<ePixmap pixmap="skin_default/buttons/green.png" position="%d,%d" size="%d,%d" alphatest="blend" scale="1"/>
<ePixmap pixmap="skin_default/buttons/yellow.png" position="%d,%d" size="%d,%d" alphatest="blend" scale="1"/>
<ePixmap pixmap="skin_default/buttons/blue.png" position="%d,%d" size="%d,%d" alphatest="blend" scale="1"/>
<widget name="key_red" position="%d,%d" zPosition="1" size="%d,%d" font="Regular;%d" halign="center" valign="center" backgroundColor="#9f1313" transparent="1"/>
<widget name="key_green" position="%d,%d" zPosition="1" size="%d,%d" font="Regular;%d" halign="center" valign="center" backgroundColor="#1f771f" transparent="1"/>
<widget name="key_yellow" position="%d,%d" zPosition="1" size="%d,%d" font="Regular;%d" halign="center" valign="center" backgroundColor="#a08500" transparent="1"/>
<widget name="key_blue" position="%d,%d" zPosition="1" size="%d,%d" font="Regular;%d" halign="center" valign="center" backgroundColor="#18188b" transparent="1"/>
<panel name="__DynamicColorButtonTemplate__"/>
<widget name="lab1" position="%d,%d" size="%d,%d" font="Regular; %d" zPosition="2" transparent="0" halign="center"/>
<widget name="list" position="%d,%d" size="%d,%d" font="Regular;%d" scrollbarMode="showOnDemand"/>
<applet type="onLayoutFinish">
self["list"].instance.setItemHeight(%d)
</applet>
</screen>""",
560, 400, # screen
0, 0, 140, 40, # colors
140, 0, 140, 40,
280, 0, 140, 40,
420, 0, 140, 40,
0, 0, 140, 40, 20,
140, 0, 140, 40, 20,
280, 0, 140, 40, 20,
420, 0, 140, 40, 20,
0, 50, 560, 50, 18, # lab1
10, 105, 540, 260, 20, # list
26,
Expand Down Expand Up @@ -1569,29 +1539,13 @@ def BackupComplete(self, answer=None):
class ImageManagerDownload(Screen):
skin = ["""
<screen name = "VIXImageManager" position="center,center" size="%d,%d">
<ePixmap pixmap="skin_default/buttons/red.png" position="%d,%d" size="%d,%d" alphatest="blend" scale="1"/>
<ePixmap pixmap="skin_default/buttons/green.png" position="%d,%d" size="%d,%d" alphatest="blend" scale="1"/>
<ePixmap pixmap="skin_default/buttons/yellow.png" position="%d,%d" size="%d,%d" alphatest="blend" scale="1"/>
<ePixmap pixmap="skin_default/buttons/blue.png" position="%d,%d" size="%d,%d" alphatest="blend" scale="1"/>
<widget name="key_red" position="%d,%d" zPosition="1" size="%d,%d" font="Regular;%d" halign="center" valign="center" backgroundColor="#9f1313" transparent="1"/>
<widget name="key_green" position="%d,%d" zPosition="1" size="%d,%d" font="Regular;%d" halign="center" valign="center" backgroundColor="#1f771f" transparent="1"/>
<widget name="key_yellow" position="%d,%d" zPosition="1" size="%d,%d" font="Regular;%d" halign="center" valign="center" backgroundColor="#a08500" transparent="1"/>
<widget name="key_blue" position="%d,%d" zPosition="1" size="%d,%d" font="Regular;%d" halign="center" valign="center" backgroundColor="#18188b" transparent="1"/>
<widget name="lab1" position="%d,%d" size="%d,%d" font="Regular; %d" zPosition="2" transparent="0" halign="center"/>
<widget name="list" position="%d,%d" size="%d,%d" font="Regular;%d" scrollbarMode="showOnDemand"/>
<applet type="onLayoutFinish">
self["list"].instance.setItemHeight(%d)
</applet>
</screen>""",
560, 400, # screen
0, 0, 140, 40, # colors
140, 0, 140, 40,
280, 0, 140, 40,
420, 0, 140, 40,
0, 0, 140, 40, 20,
140, 0, 140, 40, 20,
280, 0, 140, 40, 20,
420, 0, 140, 40, 20,
0, 50, 560, 50, 18, # lab1
10, 105, 540, 260, 20, # list
26,
Expand Down
26 changes: 2 additions & 24 deletions lib/python/Plugins/SystemPlugins/ViX/MountManager.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,14 +200,7 @@ class VIXDevicesPanel(Screen):
</convert>
</widget>
<widget name="lab1" position="%d,%d" size="%d,%d" font="Regular;%d" halign="center" transparent="1" valign="center" zPosition="+1" />
<ePixmap pixmap="skin_default/buttons/red.png" position="%d,%d" size="%d,%d" alphatest="blend" scale="1"/>
<ePixmap pixmap="skin_default/buttons/green.png" position="%d,%d" size="%d,%d" alphatest="blend" scale="1"/>
<ePixmap pixmap="skin_default/buttons/yellow.png" position="%d,%d" size="%d,%d" alphatest="blend" scale="1"/>
<ePixmap pixmap="skin_default/buttons/blue.png" position="%d,%d" size="%d,%d" alphatest="blend" scale="1"/>
<widget name="key_red" position="%d,%d" zPosition="1" size="%d,%d" font="Regular;%d" halign="center" valign="center" backgroundColor="#9f1313" transparent="1"/>
<widget name="key_green" position="%d,%d" zPosition="1" size="%d,%d" font="Regular;%d" halign="center" valign="center" backgroundColor="#1f771f" transparent="1"/>
<widget name="key_yellow" position="%d,%d" zPosition="1" size="%d,%d" font="Regular;%d" halign="center" valign="center" backgroundColor="#a08500" transparent="1"/>
<widget name="key_blue" position="%d,%d" zPosition="1" size="%d,%d" font="Regular;%d" halign="center" valign="center" backgroundColor="#18188b" transparent="1"/>
<panel name="__DynamicColorButtonTemplate__"/>
</screen>""",
560, 495, # screen
10, 50, 540, 400, # Listbox
Expand All @@ -217,14 +210,6 @@ class VIXDevicesPanel(Screen):
24, 20, # fonts
80,
10, 10, 540, 425, 25,
0, 0, 140, 40, # colors
140, 0, 140, 40,
280, 0, 140, 40,
420, 0, 140, 40,
0, 0, 140, 40, 20,
140, 0, 140, 40, 20,
280, 0, 140, 40, 20,
420, 0, 140, 40, 20,
] # noqa: E124

def __init__(self, session):
Expand Down Expand Up @@ -362,18 +347,11 @@ def addFstab(self, result=None, retval=None, extra_args=None):
class DeviceMountSetup(Screen, ConfigListScreen):
skin = ["""
<screen position="center,center" size="%d,%d">
<ePixmap pixmap="skin_default/buttons/red.png" position="%d,%d" size="%d,%d" alphatest="blend" scale="1"/>
<ePixmap pixmap="skin_default/buttons/green.png" position="%d,%d" size="%d,%d" alphatest="blend" scale="1"/>
<widget name="key_red" position="%d,%d" zPosition="1" size="%d,%d" font="Regular;%d" halign="center" valign="center" backgroundColor="#9f1313" transparent="1"/>
<widget name="key_green" position="%d,%d" zPosition="1" size="%d,%d" font="Regular;%d" halign="center" valign="center" backgroundColor="#1f771f" transparent="1"/>
<panel name="__DynamicColorButtonTemplate__"/>
<widget name="config" position="%d,%d" size="%d,%d" itemHeight="%d" font="Regular;%d" scrollbarMode="showOnDemand"/>
<widget name="lab1" position="%d,%d" size="%d,%d" font="Regular;%d" halign="center" valign="center" backgroundColor="#9f1313"/>
</screen>""",
560, 450, # screen
0, 0, 140, 40, # colors
140, 0, 140, 40,
0, 0, 140, 40, 20,
140, 0, 140, 40, 20,
0, 50, 560, 275, 26, 20, # config
0, 365, 560, 20, 18,
] # noqa: E124
Expand Down
21 changes: 7 additions & 14 deletions lib/python/Plugins/SystemPlugins/ViX/PackageManager.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,7 @@ def __init__(self, session, parent):
class PackageManager(Screen):
skin = ["""
<screen name="PackageManager" position="center,center" size="%d,%d" title="Packet manager" >
<ePixmap pixmap="skin_default/buttons/red.png" position="%d,%d" size="%d,%d" alphatest="blend" />
<ePixmap pixmap="skin_default/buttons/green.png" position="%d,%d" size="%d,%d" alphatest="blend" />
<widget source="key_red" render="Label" position="%d,%d" zPosition="1" size="%d,%d" font="Regular;%d" halign="center" valign="center" backgroundColor="#9f1313" transparent="1" />
<widget source="key_green" render="Label" position="%d,%d" zPosition="1" size="%d,%d" font="Regular;%d" halign="center" valign="center" backgroundColor="#1f771f" transparent="1" />
<panel name="__DynamicColorButtonTemplate__"/>
<widget source="list" render="Listbox" position="%d,%d" size="%d,%d" scrollbarMode="showOnDemand">
<convert type="TemplatedMultiContent">
{"template": [
Expand All @@ -42,16 +39,12 @@ class PackageManager(Screen):
</convert>
</widget>
</screen>""",
530, 420, # Screen
0, 0, 140, 40, # colours
140, 0, 140, 40,
0, 0, 140, 40, 20,
140, 0, 140, 40, 20,
5, 50, 520, 365, # list
5, 1, 440, 28, # template
5, 26, 440, 20,
445, 2, 48, 48,
5, 50, 510, 2,
560, 420, # Screen
5, 50, 550, 365, # list
5, 1, 470, 28, # template
5, 26, 470, 20,
475, 2, 48, 48,
5, 50, 540, 2,
22, 14, # font
52, # itemHeight
]
Expand Down
Loading

0 comments on commit dc70cf1

Please sign in to comment.