Update of /cvsroot/freevo/freevo/src/gui
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23143
Modified Files:
theme_engine.py
Log Message:
internal colors are now lists, not int
Index: theme_engine.py
===================================================================
RCS file: /cvsroot/freevo/freevo/src/gui/theme_engine.py,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** theme_engine.py 27 Aug 2004 14:20:19 -0000 1.4
--- theme_engine.py 7 Sep 2004 18:51:39 -0000 1.5
***************
*** 10,13 ****
--- 10,16 ----
# -----------------------------------------------------------------------
# $Log$
+ # Revision 1.5 2004/09/07 18:51:39 dischi
+ # internal colors are now lists, not int
+ #
# Revision 1.4 2004/08/27 14:20:19 dischi
# support custom areas
***************
*** 149,153 ****
#
-
def attr_int(node, attr, default, scale=0.0):
"""
--- 152,155 ----
***************
*** 408,411 ****
--- 410,415 ----
Convert a 32-bit TRGB color to a 4 element tuple
"""
+ if isinstance(col, tuple):
+ return col
if col == None:
return (0,0,0,255)
***************
*** 414,419 ****
g = (col >> 8) & 0xff
b = (col >> 0) & 0xff
! c = (r, g, b, a)
! return c
--- 418,424 ----
g = (col >> 8) & 0xff
b = (col >> 0) & 0xff
! if a == 255:
! return (r, g, b)
! return (r, g, b, a)
***************
*** 494,498 ****
pass
!
# ======================================================================
--- 499,511 ----
pass
! try:
! self.color = int2col(self.color)
! except (TypeError, AttributeError):
! pass
! try:
! self.bgcolor = int2col(self.bgcolor)
! except (TypeError, AttributeError):
! pass
!
# ======================================================================
***************
*** 724,728 ****
if self.types[type].rectangle:
self.types[type].rectangle.prepare(color)
!
if hasattr( self.types[type], 'fcontent' ):
for i in self.types[type].fcontent:
--- 737,742 ----
if self.types[type].rectangle:
self.types[type].rectangle.prepare(color)
! if self.types[type].shadow:
! self.types[type].shadow.prepare(None, color)
if hasattr( self.types[type], 'fcontent' ):
for i in self.types[type].fcontent:
***************
*** 950,953 ****
--- 964,968 ----
if color.has_key(self.color):
self.color = color[self.color]
+ self.color = int2col(self.color)
self.size = int(float(self.size) * scale)
self.font = font.get(self.name, self.size)
***************
*** 960,963 ****
--- 975,979 ----
else:
self.height += abs(self.shadow.y)
+ self.shadow.color = int2col(self.shadow.color)
***************
*** 1076,1080 ****
try:
value = attr_col(node, 'value', '')
! self._color[node.attrs[('', 'label')]] = value
except KeyError:
pass
--- 1092,1096 ----
try:
value = attr_col(node, 'value', '')
! self._color[node.attrs[('', 'label')]] = int2col(value)
except KeyError:
pass
-------------------------------------------------------
This SF.Net email is sponsored by BEA Weblogic Workshop
FREE Java Enterprise J2EE developer tools!
Get your free copy of BEA WebLogic Workshop 8.1 today.
http://ads.osdn.com/?ad_id=5047&alloc_id=10808&op=click
_______________________________________________
Freevo-cvslog mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog