git.cweiske.de
/
enigma2.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
moving up/down/left/right/around the corner/to hollywood is now possible in the wizard
[enigma2.git]
/
skin.py
diff --git
a/skin.py
b/skin.py
index dc78c1980b952c8e83baa9ee2b0c53916eb12ace..520780e6c2aef4d3e5fc5673af71d25ae664cd71 100644
(file)
--- a/
skin.py
+++ b/
skin.py
@@
-74,14
+74,15
@@
def applySingleAttribute(guiObject, desktop, attrib, value):
elif attrib == 'zPosition':
guiObject.setZPosition(int(value))
elif attrib == "pixmap":
elif attrib == 'zPosition':
guiObject.setZPosition(int(value))
elif attrib == "pixmap":
- ptr = gPixmapPtr()
- if loadPNG(ptr, value):
- raise "loading PNG failed!"
- x = ptr
- ptr = ptr.__deref__()
- desktop.makeCompatiblePixmap(ptr)
- guiObject.setPixmap(ptr)
+ ptr = loadPNG(value)
+ desktop.makeCompatiblePixmap(ptr.__deref__())
+ guiObject.setPixmap(ptr.__deref__())
# guiObject.setPixmapFromFile(value)
# 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(
elif attrib == "orientation": # used by eSlider
try:
guiObject.setOrientation(
@@
-121,6
+122,10
@@
def applySingleAttribute(guiObject, desktop, attrib, value):
guiObject.setBackgroundColor(parseColor(value))
elif attrib == "foregroundColor":
guiObject.setForegroundColor(parseColor(value))
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:
elif attrib != 'name':
print "unsupported attribute " + attrib + "=" + value
except int:
@@
-134,12
+139,6
@@
def applyAllAttributes(guiObject, desktop, attributes):
def loadSkin(desktop):
print "loading skin..."
def loadSkin(desktop):
print "loading skin..."
- def getPNG(x):
- g = gPixmapPtr()
- loadPNG(g, x)
- g = g.grabRef()
- return g
-
skin = dom.childNodes[0]
assert skin.tagName == "skin", "root element in skin must be 'skin'!"
skin = dom.childNodes[0]
assert skin.tagName == "skin", "root element in skin must be 'skin'!"
@@
-165,11
+164,11
@@
def loadSkin(desktop):
bpName = str(pixmap.getAttribute("pos"))
filename = str(pixmap.getAttribute("filename"))
bpName = str(pixmap.getAttribute("pos"))
filename = str(pixmap.getAttribute("filename"))
- png =
get
PNG(filename)
+ png =
load
PNG(filename)
# adapt palette
# adapt palette
- desktop.makeCompatiblePixmap(png)
- style.setPixmap(eWindowStyleSkinned.__dict__[bsName], eWindowStyleSkinned.__dict__[bpName], png)
+ desktop.makeCompatiblePixmap(png
.__deref__()
)
+ style.setPixmap(eWindowStyleSkinned.__dict__[bsName], eWindowStyleSkinned.__dict__[bpName], png
.__deref__()
)
for color in elementsWithTag(windowstyle.childNodes, "color"):
type = str(color.getAttribute("name"))
for color in elementsWithTag(windowstyle.childNodes, "color"):
type = str(color.getAttribute("name"))