git.cweiske.de
/
enigma2.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
8eb03b9
)
- merge cluts for borders, too
author
Felix Domke
<tmbinc@elitedvb.net>
Fri, 20 May 2005 20:50:42 +0000
(20:50 +0000)
committer
Felix Domke
<tmbinc@elitedvb.net>
Fri, 20 May 2005 20:50:42 +0000
(20:50 +0000)
mytest.py
patch
|
blob
|
history
skin.py
patch
|
blob
|
history
diff --git
a/mytest.py
b/mytest.py
index 461fdfa2593c7f90c19f71f30f09cc61844d68f5..d6cfb1a2d81823618ce2e3b6230a24294aefc094 100644
(file)
--- a/
mytest.py
+++ b/
mytest.py
@@
-153,7
+153,7
@@
def runScreenTest():
import keymapparser
keymapparser.readKeymap()
import skin
import keymapparser
keymapparser.readKeymap()
import skin
-skin.loadSkin()
+skin.loadSkin(
getDesktop()
)
# first, setup a screen
runScreenTest()
# first, setup a screen
runScreenTest()
diff --git
a/skin.py
b/skin.py
index 3f5cd26e724a99a09dcf6db3a3c9df340f506bca..bc4931fbd34c3a6694c75ecf254973e9c413947f 100644
(file)
--- a/
skin.py
+++ b/
skin.py
@@
-162,7
+162,6
@@
def applyAttributes(guiObject, node, desktop):
raise "loading PNG failed!"
x = ptr
ptr = ptr.__deref__()
raise "loading PNG failed!"
x = ptr
ptr = ptr.__deref__()
- print desktop
desktop.makeCompatiblePixmap(ptr)
guiObject.setPixmap(ptr)
# guiObject.setPixmapFromFile(value)
desktop.makeCompatiblePixmap(ptr)
guiObject.setPixmap(ptr)
# guiObject.setPixmapFromFile(value)
@@
-200,7
+199,7
@@
def applyAttributes(guiObject, node, desktop):
except AttributeError:
print "widget %s (%s) doesn't support attribute %s!" % ("", guiObject.__class__.__name__, attrib)
except AttributeError:
print "widget %s (%s) doesn't support attribute %s!" % ("", guiObject.__class__.__name__, attrib)
-def loadSkin():
+def loadSkin(
desktop
):
print "loading skin..."
def getPNG(x):
print "loading skin..."
def getPNG(x):
@@
-231,7
+230,11
@@
def loadSkin():
bpName = str(pixmap.getAttribute("pos"))
filename = str(pixmap.getAttribute("filename"))
bpName = str(pixmap.getAttribute("pos"))
filename = str(pixmap.getAttribute("filename"))
- style.setPixmap(eWindowStyleSkinned.__dict__[bsName], eWindowStyleSkinned.__dict__[bpName], getPNG(filename))
+ png = getPNG(filename)
+
+ # adapt palette
+ desktop.makeCompatiblePixmap(png)
+ style.setPixmap(eWindowStyleSkinned.__dict__[bsName], eWindowStyleSkinned.__dict__[bpName], png)
for color in elementsWithTag(windowstyle.childNodes, "color"):
type = str(color.getAttribute("name"))
for color in elementsWithTag(windowstyle.childNodes, "color"):
type = str(color.getAttribute("name"))