Skip to content
More languages

Translate automatically from English. Screenshots and search terms remain English.

Google Translate loads after you choose a language.

English original

Skin XML structure and template syntax

These entries cover names consumed outside the central widget attribute parser. Start with the dictionary to find an attribute across contexts. Combine the structural entries below with the current visual attributes supported by the actual widget.

Examples are fragments for the stated parent element. Supply the existing files, screen components and sources described by each example. They were checked against the pinned source; no new receiver rendering test is claimed. Defaults are stated only where the loader supplies them. Component/runtime settings can override them.

skin

Context: Resource file. Root container for global resources and screen definitions.

<skin>
  <colors><color name="BodyText" value="#00FFFFFF" /></colors>
</skin>

screen

Context: Skin root. Register a screen definition selected by its Python screen class.

AttributeSyntax and purpose
nameScreen name matched by the class skinName; case-sensitive.
idOutput ID: 0 normally means the TV OSD; displays use their own IDs.
positionx,y or center,center in the design coordinate system.
sizewidth,height of the screen.
resolutionwidth,height of the design coordinate system.
titleTranslated window title.
flagsComma-separated window flags, for example wfNoBorder.
ignoreWidgetsComma-separated optional Python widget names excluded from missing-widget warnings.
<screen name="ExampleScreen" position="center,center" size="600,400" resolution="1920,1080" title="Example">
  <eLabel position="20,20" size="560,60" font="Regular;28" text="Hello" />
</screen>
  • The screen must be opened by Python; a skin file does not create a menu entry. Visual attributes are listed under eWindow.

widget

Context: Inside a screen. Bind an existing component, connect a renderer to a source, or instantiate an addon.

AttributeSyntax and purpose
nameExisting GUI component name; use the name declared by the screen.
sourceExisting source name, optionally a supported related-screen path.
renderRenderer module/class name, for example Label or Listbox.
addonAddon class, for example ScreenHeader. Its own connection and attribute contract applies.
connectionComma-separated existing component names required by the addon.
<widget source="description" render="Label" position="20,20" size="560,60" font="Regular;28" />
  • The example requires a source description exposing text. Use the component, source/renderer or addon form as appropriate; these do not create missing sources.

convert

Context: Inside a source widget. Transform a source before the renderer consumes it.

AttributeSyntax and purpose
typeConverter module/class name. Arguments belong in element text, not generic widget attributes.
<widget source="global.CurrentTime" render="Label" position="20,20" size="300,60" font="Regular;28">
  <convert type="ClockToText">WithSeconds</convert>
</widget>
  • Converter arguments are class-specific. Consult the converter reference for their separators and accepted options.

eLabel / ePixmap / eRectangle

Context: Inside a screen. Create decorative native widgets without a Python GUI component.

AttributeSyntax and purpose
positionx,y within the current screen/panel.
sizewidth,height of the decoration.
<eLabel position="20,20" size="400,60" font="Regular;28" text="Example" underline="1" />
  • Use the native-widget reference for additional attributes. eRectangle uses backgroundColor for its fill.

panel

Context: Inside a screen. Include a named screen/panel definition or arrange child widgets in a local layout context.

AttributeSyntax and purpose
nameOptional existing screen/panel definition to include.
positionx,y, fill or an edge docking position supported by the current layout.
sizewidth,height of the local area.
layoutstack, vertical or horizontal.
spacingInteger gap used by the layout context.
fontOptional font alias/face for character-relative layout metrics.
<panel position="20,20" size="560,100" layout="horizontal" spacing="8">
  <eLabel position="left" size="200,60" font="Regular;28" text="Left" />
</panel>
  • Screen panels and panels inside list templates use different parsers.

eStack

Context: Inside a screen. Create a native stack container for its child widgets.

AttributeSyntax and purpose
positionx,y within the screen.
sizewidth,height of the stack.
layouthorizontal or vertical.
spacingInteger space between children.
<eStack position="20,20" size="560,100" layout="horizontal" spacing="8">
  <eLabel position="left" size="200,60" font="Regular;28" text="Item" />
</eStack>
  • Do not confuse the eStack element with the no-op stack attribute.

output / resolution

Context: Skin root. Set the GUI output resolution.

AttributeSyntax and purpose
idOn output: output ID; omitted means GUI ID 0.
xresOn resolution: horizontal pixels; loader fallback 720.
yresOn resolution: vertical pixels; loader fallback 576.
bppOn resolution: bits per pixel, normally 32; non-32-bit palette loading is not implemented here.
<output id="0"><resolution xres="1920" yres="1080" bpp="32" /></output>

include

Context: Skin root. Load another skin resource file.

AttributeSyntax and purpose
filenameExisting file resolved in the current skin path/scope.
conditionalOptional Python expression evaluated by the loader. Omit for unconditional inclusion.
<include filename="skinparts/common.xml" />
  • This conditional is an expression, unlike conditional on an ordinary screen child, which tests component names.

colors / color

Context: Skin root. Register named colours or gradients for supported parsers.

AttributeSyntax and purpose
nameOn color: alias name.
valueOn color: #AARRGGBB or a named colour; a comma-containing value registers a gradient string.
<colors>
  <color name="BodyText" value="#00FFFFFF" />
  <color name="RowGradient" value="#00203040,#006080A0,vertical" />
</colors>
  • AA is transparency: 00 opaque, FF transparent. Use the gradient only in attributes supporting gradients.

fonts / font

Context: Skin root. Register an existing font file under a face name.

AttributeSyntax and purpose
filenameExisting font file resolved through the font/skin path.
nameRegistered face name; loader fallback Regular.
scaleInteger percentage; default 100.
replacementBoolean replacement-font flag; default false.
renderInteger native font-render option; default 0. Leave it at 0 unless your font requires another supported native mode.
<fonts><font filename="myfont.ttf" name="MyFont" scale="100" replacement="0" render="0" /></fonts>
  • Replace myfont.ttf with an installed/bundled font. This font element is different from a widget font="Face;size" attribute.

fonts / alias

Context: Skin root. Give a font and layout metrics a reusable alias.

AttributeSyntax and purpose
nameAlias name.
fontAlready registered face.
sizeFont size; default 20.
heightCharacter-layout height metric; default 25.
widthCharacter-layout width metric; default 18.
<fonts><alias name="BodyLarge" font="Regular" size="28" height="36" width="18" /></fonts>
  • width and height are layout metrics, not measurements of each displayed string.

parameters / parameter

Context: Skin root. Supply named values consumed by Python components.

AttributeSyntax and purpose
nameExact parameter key expected by the component.
valueComma-separated typed values: integer, float, 0xHEX, #AARRGGBB, registered colour, Face;size, or *text for a string.
<parameters><parameter name="ConfigListSlider" value="17,0" /></parameters>
  • The key and tuple shape are component-specific. This example controls configuration slider height and border width.

variables / variable

Context: Skin root. Register a coordinate pair used by parsers supporting variable substitution.

AttributeSyntax and purpose
nameVariable name.
valueExactly two comma-separated coordinate strings in this loader.
<variables><variable name="BodyInset" value="20,20" /></variables>
  • Not a general XML macro. Use only in parsers that consult the variables table.

switchpixmap / pixmap

Context: Skin root. Register a named, preloaded image.

AttributeSyntax and purpose
namePixmap identifier.
filenameExisting image file resolved in the skin scope.
<switchpixmap><pixmap name="statusIcon" filename="icons/status.png" /></switchpixmap>

windowstyle

Context: Skin root. Supply defaults shared by widgets using a window style.

AttributeSyntax and purpose
idWindow style ID; omitted means GUI ID 0.
<windowstyle id="0">
  <label font="Regular;28" />
  <listbox font="Regular;24" scrollbarMode="showOnDemand" scrollbarWidth="12" scrollbarOffset="4" />
  <configList entryFont="Regular;24" valueFont="Regular;24" headerFont="Regular;26" />
</windowstyle>
  • Global defaults are not identical to per-widget attribute parsing. Some listbox defaults affect global native state.

configList

Context: Inside windowstyle. Configure default configuration-label/value/header fonts and offsets.

AttributeSyntax and purpose
entryFontFace;size of entry labels.
valueFontFace;size of values.
headerFontFace;size of headers.
readOnlyColorColour for read-only configuration entries; global, last loaded setting wins.
entryLeftOffsetInteger entry left offset; fallback 15.
headerLeftOffsetInteger header left offset; fallback 15.
indentSizeInteger indentation step; fallback 20.
entryFontScaleRecognised by the loader, but the pinned branch refers to style.guiObject. No working example is claimed for this path.
<configList entryFont="Regular;24" valueFont="Regular;24" headerFont="Regular;26" entryLeftOffset="15" headerLeftOffset="15" indentSize="20" />

listbox / scrolllabel

Context: Inside windowstyle. Set shared list and scrolling-label defaults.

AttributeSyntax and purpose
fontlistbox only: default list font, fallback Regular;20.
horizontalAlignmentlistbox only: default text alignment left/center/right/block.
verticalAlignmentlistbox only: top/center/middle/bottom.
enableWrapAroundlistbox only: Boolean list-navigation wrap.
scrollbarModeNative mode token; ScrollLabel later applies its own supported modes.
scrollbarWidthInteger scrollbar thickness.
scrollbarOffsetInteger content-to-scrollbar gap.
scrollbarBorderWidthInteger scrollbar border thickness.
scrollbarScrollbyPage or byLine.
scrollbarRadiusradius[;edges] using the corner-radius parser.
<listbox font="Regular;24" scrollbarMode="showOnDemand" scrollbarWidth="12" scrollbarOffset="4" />
  • These are global defaults, parsed without per-screen scaling here. Explicit widget attributes can override them.

label / title / slider / stringList

Context: Inside windowstyle. Set other native style defaults.

AttributeSyntax and purpose
fontOn label/title: Face;size, fallback Regular;20.
offsetOn title: x,y title offset; fallback 20,5.
borderWidthOn slider: integer default border width.
textPaddingOn stringList: one/two/four padding integers. This context still uses textPadding; do not rename it to padding solely because the central widget alias is deprecated.
<title font="Regular;28" offset="20,5" />

margin

Context: Skin root. Set margins on the selected desktop.

AttributeSyntax and purpose
idDesktop ID, normally 0 for the TV GUI.
leftInteger left margin.
topInteger top margin.
rightInteger right margin.
bottomInteger bottom margin.
<margin id="0" left="0" top="0" right="0" bottom="0" />

templates / template

Context: Inside a source widget. Define list row drawing operations for XmlMultiContent.

AttributeSyntax and purpose
nameTemplate selector, normally Default; matches List.template.
fontsComma-separated Face;size entries; child font indexes start at 0.
itemWidthRow width; when absent the surrounding widget width is used.
itemHeightRow height; supply a positive value.
componentFor external modern service-list templates: serviceList. This is not a generic XmlMultiContent selector.
<widget source="list" render="Listbox" position="20,20" size="600,280">
  <template name="Default" fonts="Regular;28" itemHeight="70">
    <text index="0" position="0,0" size="600,70" font="0" />
  </template>
</widget>
  • Requires a List source called list, with text at tuple index 0. The loader inserts XmlMultiContent automatically. Unknown template attributes only have an effect when the owning component reads them.

mode / rowtemplate

Context: Inside a list template. Choose a whole-list style or a per-row drawing variant.

AttributeSyntax and purpose
nameOn mode: style selector, normally default; matches List.style.
itemWidthOn mode: optional row-width override.
itemHeightOn mode: optional row-height override.
<mode name="default" itemHeight="50">
  <text index="0" position="0,0" size="600,50" font="0" />
</mode>
  • For rowtemplate variants, XML order gives the numeric selector used in tuple field 0. Rowtemplates share the template row size; no per-row itemHeight override.

text

Context: Inside a list template. Draw a text field from the row tuple, or static text.

AttributeSyntax and purpose
indexTuple number or an indexNames key supplied by the component; omit for static text.
textStatic text when no row index is selected.
positionx,y inside the row or template panel.
sizewidth,height of the text rectangle.
fontZero-based integer index into the template fonts table; not Face;size.
flagsComma-separated blend, underline, scroll. Underlining here uses flags="underline".
horizontalAlignmentleft, center, right or block.
verticalAlignmenttop, center/middle or bottom.
wrapnoWrap/off/0, wrap/on/1, or ellipsis.
paddingOne/two/four values in left,top,right,bottom order; generic XmlMultiContent scales the padding.
foregroundColorNormal text colour; generic named-index lists can use +FieldName.
foregroundColorSelectedSelected text colour.
backgroundColorNormal field background.
backgroundColorSelectedSelected field background.
textBorderWidthInteger glyph-outline width.
textBorderColorGlyph-outline colour.
formatRecorded by XmlMultiContent, but only effective if the owning screen consumes templateDataFormats.
conditionalConstruction-time expression in the template parser; not a live visibility binding.
<text index="0" position="0,0" size="600,70" font="0" flags="underline" horizontalAlignment="left" />
  • Field availability belongs to the owner. Named service-list fields and network fields are different contracts.

pixmap

Context: Inside a list template. Draw a row pixmap or a static image.

AttributeSyntax and purpose
indexRow field index/name containing the image data expected by this builder.
pixmapStatic image when no row index is selected.
positionx,y inside the row.
sizewidth,height inside the row.
alphablend, test, or omitted for ordinary pixmap drawing. This is not alphaTest.
scalePixmap scaling token, for example centerScaled.
paddingOne/two/four inset values for generic XmlMultiContent.
cornerRadiusradius[;edges] where the drawing operation supports it.
<pixmap position="0,0" size="80,50" pixmap="icons/example.png" alpha="blend" scale="centerScaled" />
  • Replace the image with an existing asset. A field storing an icon-font glyph is text, not a pixmap.

rectangle / progress

Context: Inside a list template. Draw row decorations or progress values.

AttributeSyntax and purpose
indexFor progress: row data field containing the progress value.
positionx,y inside the row.
sizewidth,height of the drawing rectangle.
foregroundColorProgress fill; also rectangle fill in the specialised service-list builder.
backgroundColorGeneric XmlMultiContent rectangle fill/background.
foregroundColorSelectedSelected-state foreground.
backgroundColorSelectedSelected-state background.
borderWidthInteger outline width.
borderColorNormal outline colour.
borderColorSelectedSelected outline colour where supported by the chosen operation.
cornerRadiusradius[;edges].
foregroundGradientstart[,middle],end,direction[,alphaBlend]. Current template field; do not migrate it as if it were the central deprecated attribute.
foregroundGradientSelectedSelected-state gradient.
<rectangle position="0,0" size="600,50" backgroundColor="#00203040" />
  • This example is for generic XmlMultiContent. ServiceListTemplateParser uses foregroundColor for a rectangle fill; inspect the owner before copying.

panel

Context: Inside a list template. Arrange row drawing items in a local layout context.

AttributeSyntax and purpose
positionLocal x,y, fill or an edge placement supported by the template context.
sizewidth,height of the row-local panel.
layouthorizontal, vertical or stack.
spacingInteger layout gap.
autoGrowOn a child item in a horizontal panel: any non-empty string requests leftover width for the first matching item. Omit to disable; the string "0" is non-empty and therefore does not disable it.
<panel position="0,0" size="600,50" layout="horizontal" spacing="10">
  <text index="0" position="left" size="180,50" font="0" />
  <text index="1" position="left" size="400,50" font="0" />
</panel>
  • autoGrow is parsed during layout and is not the scrollbar shrink option. No autoGrow rendering example is claimed for this snapshot.

constant-widgets / constant-widget / layouts / layout

Context: Skin root and references inside screens. Register reusable widget groups and insert them by name.

AttributeSyntax and purpose
nameOn constant-widget/layout: definition name; the same name selects it from a screen reference.
<skin>
  <layouts>
    <layout name="ExampleHeading">
      <eLabel position="20,20" size="560,60" font="Regular;28" text="Heading" />
    </layout>
  </layouts>
  <screen name="ExampleScreen" position="center,center" size="600,400">
    <layout name="ExampleHeading" />
  </screen>
</skin>
  • The layout element is a named resource reference; layout="horizontal" on a panel is a separate attribute.

screens / menus / setups

Context: Skin root. Map screen, menu or setup keys to images consumed by the UI.

AttributeSyntax and purpose
keyOn screen/menu/setup: one exact key requested by the consuming component.
keysOn screen/menu/setup: comma-separated keys; used instead of key when supplied.
imageImage path read by the consuming UI component.
<menus><menu key="mainmenu" image="icons/menu.png" /></menus>
  • Use a key that the target UI actually requests and an existing asset. This does not add a new menu or setup screen.

color

Context: Inside windowstyle. Set a named native style colour.

AttributeSyntax and purpose
nameNative colour role without the col prefix, for example Background, Foreground or ListboxBackgroundSelected.
colorRegistered colour or #AARRGGBB. Unlike colors/color this attribute is named color, not value.
<color name="ListboxBackgroundSelected" color="#00305070" />
  • Native roles include Background, Foreground, ListboxBackground, ListboxForeground, ListboxBackgroundSelected, ListboxForegroundSelected, ListboxBackgroundMarked, ListboxForegroundMarked, ListboxBackgroundMarkedSelected, ListboxForegroundMarkedSelected, WindowTitleForeground, WindowTitleBackground, ScrollbarForeground, ScrollbarBackground, ScrollbarBorder, SliderForeground, SliderBackground and SliderBorder.

borderset / pixmap

Context: Inside windowstyle. Assign image pieces to a native window, button or list-entry border.

AttributeSyntax and purpose
nameOn borderset: bsWindow, bsButton or bsListboxEntry.
posOn pixmap: bpTopLeft, bpTop, bpTopRight, bpLeft, bpBackground, bpRight, bpBottomLeft, bpBottom or bpBottomRight.
filenameExisting image file for that border piece.
<borderset name="bsWindow"><pixmap pos="bpTopLeft" filename="borders/top-left.png" /></borderset>
  • Replace the asset path and supply the pieces needed by your design.

subtitles / sub

Context: Skin root. Configure native subtitle font and outline styles.

AttributeSyntax and purpose
nameExisting eSubtitleWidget face name, such as Subtitle_Regular.
fontRegistered Face;size.
foregroundColorOptional forced text colour; omitted means no forced colour.
borderColorSubtitle outline colour.
borderWidthInteger outline width, fallback 3.
shadowColorLegacy fallback used when borderColor is absent in this subtitle context.
<subtitles><sub name="Subtitle_Regular" font="Regular;40" foregroundColor="#00FFFFFF" borderColor="#00000000" borderWidth="3" /></subtitles>
  • This affects the native subtitle style, not a normal label. Subtitle rendering may also depend on the subtitle format and receiver settings.

applet

Context: Inside a screen. Attach trusted Python code to a screen callback.

AttributeSyntax and purpose
typeonLayoutFinish or onContentChanged; the element body contains Python code.
<applet type="onLayoutFinish">self.setTitle("Example")</applet>
  • A skin applet executes code on the receiver. Keep ordinary appearance in XML attributes; this example only demonstrates callback placement.

foregroundColorMarked / foregroundColorMarkedAndSelected / backgroundColorMarked / backgroundColorMarkedAndSelected

Context: Modern service-list template mode/items. Choose colours for marked services and for a service that is marked and selected.

AttributeSyntax and purpose
foregroundColorMarkedText/foreground colour when marked.
foregroundColorMarkedAndSelectedText/foreground colour when marked and selected.
backgroundColorMarkedBackground when marked.
backgroundColorMarkedAndSelectedBackground when marked and selected.
<text index="ServiceName" position="0,0" size="600,50" font="0" foregroundColorMarked="#00FFD060" foregroundColorMarkedAndSelected="#00FFFFFF" />
  • This is a serviceList template field, not a generic XmlMultiContent tuple index or an ordinary widget attribute.

For the complete service-list field contracts and additional state colours, see service-list templates. For generic row indexes, named fields and mixed row templates, see XmlMultiContent. XML resource loading is defined by loadSingleSkinData, screen construction by readSkin.