Author: dmeyer
Date: Sun Feb 25 20:02:02 2007
New Revision: 9285
Modified:
trunk/ui/src/gui/areas/handler.py
trunk/ui/src/gui/compat.py
Log:
add some (deactivated) code to fade to colorkey
Modified: trunk/ui/src/gui/areas/handler.py
==============================================================================
--- trunk/ui/src/gui/areas/handler.py (original)
+++ trunk/ui/src/gui/areas/handler.py Sun Feb 25 20:02:02 2007
@@ -58,7 +58,7 @@
from kaa.weakref import weakref
# gui imports
-from freevo.ui.gui.widgets import Container
+from freevo.ui.gui.widgets import Container, Rectangle
from freevo.ui.gui import theme as theme_engine
from freevo.ui.gui import imagelib, animation, displays
@@ -112,6 +112,22 @@
kaa.notifier.signals['shutdown'].connect_weak(self._cleanup_on_shutdown)
+ def set_background(self, col):
+ a = 255 - ((col >> 24) & 0xff)
+ r = (col >> 16) & 0xff
+ g = (col >> 8) & 0xff
+ b = (col >> 0) & 0xff
+ color = (r, g, b, a)
+ if a == 255:
+ color = (r,g,b)
+ log.info('set color key %s', str(color))
+ # FIXME: this looks very very ugly. This results in fading
+ # to pure blue or pure green when starting a player. We need
+ # a good default colorkey.
+ r = Rectangle((0,0), (self.width, self.height), color, 0, color)
+ self.layer[0].add_child(r)
+
+
def __del__(self):
"""
Delete an area handler
Modified: trunk/ui/src/gui/compat.py
==============================================================================
--- trunk/ui/src/gui/compat.py (original)
+++ trunk/ui/src/gui/compat.py Sun Feb 25 20:02:02 2007
@@ -114,6 +114,10 @@
name = 'video'
areas = ()
+ def __init__(self):
+ from freevo.ui.config import config
+ BaseApplication.__init__(self)
+ self.engine.set_background(int(config.player.video.colorkey))
def set_item(self, item):
self.item = item
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Freevo-cvslog mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freevo-cvslog