Fixes and tidy ups for Clutter changes

This commit is contained in:
noisymime 2008-02-04 11:47:54 +00:00
parent 709b6547b2
commit 993fc28afe
4 changed files with 25 additions and 12 deletions

View File

@ -27,6 +27,8 @@ class GlossMgr:
#The background is a bit messy due to the depth issues :(
background = self.themeMgr.get_texture("background", None, None)
background.set_size(self.stage.get_width(), self.stage.get_height())
"""
(width, height) = background.get_abs_size()
print background.get_abs_size()
#background.set_anchor_point_from_gravity(clutter.GRAVITY_NORTH_WEST)
@ -44,7 +46,9 @@ class GlossMgr:
print background.get_abs_size()
#background.set_width(width)
#background.set_height(height)
"""
background.show()
self.stage.add(background)
print "Perspective: " + str(stage.get_perspective())
#stage.set_perspective(60.0, 1.0, 0.1, 1)

View File

@ -7,7 +7,7 @@ from xml.dom import minidom
class ThemeMgr:
defaultTheme = "default"
currentTheme = "default"
currentTheme = "Pear"
#currentTheme = "Pear"
#currentTheme = "Mich"
def __init__(self, glossMgr):

View File

@ -16,7 +16,7 @@ class Transition:
def do_transition(self, timeline, oldGroup, newGroup):
timeline.connect('completed', self.on_transition_complete, oldGroup)
newGroup.set_opacity(0)
(x, y) = oldGroup.get_position()
newGroup.set_position(x, y)

View File

@ -15,8 +15,9 @@ class Transition:
newGroup.show()
knots_incoming = (\
( int(-newGroup.get_width()), int(oldGroup.get_y() * 0.8) ),\
( int(oldGroup.get_x()/2) , int(oldGroup.get_y() * 0.9) ),\
#( int(-newGroup.get_width()), int(oldGroup.get_y() * 0.8) ),\
( int(oldGroup.get_x()/2), int(oldGroup.get_y()*1.5) ),\
( int(oldGroup.get_x()*1.2) , int(oldGroup.get_y()) ),\
( oldGroup.get_x(), oldGroup.get_y() )\
)
@ -24,8 +25,10 @@ class Transition:
self.behaviour_incoming_bspline = clutter.BehaviourPath(knots=knots_incoming, alpha=alpha)
self.behaviour_incoming_bspline.apply(newGroup)
self.behaviour_incoming_depth = clutter.BehaviourDepth(depth_start=-1000, depth_end=oldGroup.get_depth(), alpha=alpha)
self.behaviour_incoming_depth.apply(newGroup)
self.behaviour_incoming_scale = clutter.BehaviourScale(x_scale_start=0, y_scale_start=0, x_scale_end=1, y_scale_end=1, alpha=alpha)
self.behaviour_incoming_scale.apply(newGroup)
#self.behaviour_incoming_depth = clutter.BehaviourDepth(depth_start=-1000, depth_end=oldGroup.get_depth(), alpha=alpha)
#self.behaviour_incoming_depth.apply(newGroup)
self.behaviour_incoming_opacity = clutter.BehaviourOpacity(opacity_start=0, opacity_end=oldGroup.get_opacity(), alpha=alpha)
self.behaviour_incoming_opacity.apply(newGroup)
@ -38,8 +41,10 @@ class Transition:
( oldGroup.get_x(), oldGroup.get_y() )\
)
self.behaviour_outgoing_depth = clutter.BehaviourDepth(depth_start=oldGroup.get_depth(), depth_end=1000, alpha=alpha)
self.behaviour_outgoing_depth.apply(oldGroup)
self.behaviour_outgoing_scale = clutter.BehaviourScale(x_scale_start=1, y_scale_start=1, x_scale_end=0, y_scale_end=0, alpha=alpha)
self.behaviour_outgoing_scale.apply(oldGroup)
#self.behaviour_outgoing_depth = clutter.BehaviourDepth(depth_start=oldGroup.get_depth(), depth_end=1000, alpha=alpha)
#self.behaviour_outgoing_depth.apply(oldGroup)
self.behaviour_outgoing_opacity = clutter.BehaviourOpacity(opacity_start=oldGroup.get_opacity(), opacity_end=0, alpha=alpha)
self.behaviour_outgoing_opacity.apply(oldGroup)
@ -63,8 +68,10 @@ class Transition:
self.behaviour_incoming_bspline = clutter.BehaviourPath(knots=knots_incoming, alpha=alpha)
self.behaviour_incoming_bspline.apply(newGroup)
self.behaviour_incoming_depth = clutter.BehaviourDepth(depth_start=1000, depth_end=oldGroup.get_depth(), alpha=alpha)
self.behaviour_incoming_depth.apply(newGroup)
self.behaviour_incoming_scale = clutter.BehaviourScale(x_scale_start=2, y_scale_start=2, x_scale_end=1, y_scale_end=1, alpha=alpha)
self.behaviour_incoming_scale.apply(newGroup)
#self.behaviour_incoming_depth = clutter.BehaviourDepth(depth_start=1000, depth_end=oldGroup.get_depth(), alpha=alpha)
#self.behaviour_incoming_depth.apply(newGroup)
self.behaviour_incoming_opacity = clutter.BehaviourOpacity(opacity_start=0, opacity_end=oldGroup.get_opacity(), alpha=alpha)
self.behaviour_incoming_opacity.apply(newGroup)
@ -79,8 +86,10 @@ class Transition:
self.behaviour_outgoing_bspline = clutter.BehaviourPath(knots=knots_outgoing, alpha=alpha)
self.behaviour_outgoing_bspline.apply(oldGroup)
self.behaviour_outgoing_depth = clutter.BehaviourDepth(depth_start=oldGroup.get_depth(), depth_end=-1000, alpha=alpha)
self.behaviour_outgoing_depth.apply(oldGroup)
self.behaviour_outgoing_scale = clutter.BehaviourScale(x_scale_start=1, y_scale_start=1, x_scale_end=0, y_scale_end=0, alpha=alpha)
self.behaviour_outgoing_scale.apply(oldGroup)
#self.behaviour_outgoing_depth = clutter.BehaviourDepth(depth_start=oldGroup.get_depth(), depth_end=-1000, alpha=alpha)
#self.behaviour_outgoing_depth.apply(oldGroup)
self.behaviour_outgoing_opacity = clutter.BehaviourOpacity(opacity_start=oldGroup.get_opacity(), opacity_end=0, alpha=alpha)
self.behaviour_outgoing_opacity.apply(oldGroup)