Example #1
0
    def __init__(self, image, target, size=BUTTONSIZE):
        """Initialize the class."""

        Clutter.Texture.__init__(self)

        width, height = getNewSize(size, size)
        self.set_size(width, height)

        icon = icontheme.lookup_icon(image, width,
                                     Gtk.IconLookupFlags.USE_BUILTIN)
        if icon:
            print icon.get_filename(), width
            self.set_from_file(icon.get_filename())

        self.set_reactive(True)
        self.connect("button-press-event", self.on_click, target)

        # Create transition
        self.transition = Clutter.PropertyTransition()
        self.transition.set_progress_mode(
            Clutter.AnimationMode.EASE_OUT_BOUNCE)
        self.transition.set_duration(5000)
        self.transition.set_from(100.0)
        self.transition.set_to(50.0)
        self.transition.set_animatable(self)

        self.transition.start()
Example #2
0
	def __init__(self, image, target, size=BUTTONSIZE):
		"""Initialize the class."""
		
		Clutter.Texture.__init__(self)
		
		width, height = getNewSize(size,size)
		self.set_size(width,height)
		
		icon = icontheme.lookup_icon(image,width,Gtk.IconLookupFlags.USE_BUILTIN)
		if icon:
			print icon.get_filename(), width
			self.set_from_file(icon.get_filename())
		
		self.set_reactive(True)
		self.connect("button-press-event", self.on_click, target)
		
		# Create transition
		self.transition = Clutter.PropertyTransition()
		self.transition.set_progress_mode(Clutter.AnimationMode.EASE_OUT_BOUNCE)
		self.transition.set_duration(5000)
		self.transition.set_from(100.0)
		self.transition.set_to(50.0)
		self.transition.set_animatable(self)
		
		self.transition.start()
Example #3
0
	def ready(self):
		
		# Do nice shortcuts...
		wallpaper = self.objects["main/wallpaper"]
		minilauncher = self.objects["main/minilauncher"]
		
		self.build_minilauncher()
		
		# We need to position down the minilauncher.
		buttonsize = getNewSize(launcher.BUTTONSIZE, 0)[0]
		newsize = HEIGHT - buttonsize
		minilauncher["minilauncher"].set_y(newsize)
Example #4
0
    def ready(self):

        # Do nice shortcuts...
        wallpaper = self.objects["main/wallpaper"]
        minilauncher = self.objects["main/minilauncher"]

        self.build_minilauncher()

        # We need to position down the minilauncher.
        buttonsize = getNewSize(launcher.BUTTONSIZE, 0)[0]
        newsize = HEIGHT - buttonsize
        minilauncher["minilauncher"].set_y(newsize)