elif attrib == 'size':
guiObject.resize(parseSize(value))
elif attrib == 'title':
- guiObject.setTitle(value)
+ guiObject.setTitle(_(value))
elif attrib == 'text':
guiObject.setText(value)
elif attrib == 'font':
guiObject.setFont(parseFont(value))
+ elif attrib == 'zPosition':
+ guiObject.setZPosition(int(value))
elif attrib == "pixmap":
ptr = gPixmapPtr()
if loadPNG(ptr, value):
desktop.makeCompatiblePixmap(ptr)
guiObject.setPixmap(ptr)
# guiObject.setPixmapFromFile(value)
+ elif attrib == "alphatest": # used by ePixmap
+ guiObject.setAlphatest(
+ { "on": True,
+ "off": False
+ }[value])
elif attrib == "orientation": # used by eSlider
try:
guiObject.setOrientation(
guiObject.setBackgroundColor(parseColor(value))
elif attrib == "foregroundColor":
guiObject.setForegroundColor(parseColor(value))
+ elif attrib == "selectionDisabled":
+ guiObject.setSelectionEnable(0)
+ elif attrib == "transparent":
+ guiObject.setTransparent(int(value))
elif attrib != 'name':
print "unsupported attribute " + attrib + "=" + value
except int:
for windowstyle in elementsWithTag(skin.childNodes, "windowstyle"):
style = eWindowStyleSkinned()
- style.setTitleFont(gFont("Arial", 13));
- style.setTitleOffset(eSize(3, 3));
+ style.setTitleFont(gFont("Arial", 20));
+ style.setTitleOffset(eSize(20, 5));
for borderset in elementsWithTag(windowstyle.childNodes, "borderset"):
bsName = str(borderset.getAttribute("name"))
myscreen = x
del skin
- assert myscreen != None, "no skin for screen '" + name + "' found!"
+ if myscreen is None:
+ # try embedded skin
+ print screen.__dict__
+ if "parsedSkin" in screen.__dict__:
+ myscreen = screen.parsedSkin
+ elif "skin" in screen.__dict__:
+ myscreen = screen.parsedSkin = xml.dom.minidom.parseString(screen.skin).childNodes[0]
+
+ assert myscreen is not None, "no skin for screen '" + name + "' found!"
screen.skinAttributes = [ ]
collectAttributes(screen.skinAttributes, myscreen)