示例#1
0
	def becomeMainWindow(self):
		super(Window, self).becomeMainWindow()
		NSAnimationContext.beginGrouping()
		NSAnimationContext.currentContext().setTimingFunction_(CAMediaTimingFunction.functionWithName_(kCAMediaTimingFunctionEaseInEaseOut))
		NSAnimationContext.currentContext().setDuration_(0.2)
		self.animator().setAlphaValue_(1)
		NSAnimationContext.endGrouping()
示例#2
0
	def becomeMainWindow(self):
		super(Window, self).becomeMainWindow()
		NSAnimationContext.beginGrouping()
		NSAnimationContext.currentContext().setTimingFunction_(CAMediaTimingFunction.functionWithName_(kCAMediaTimingFunctionEaseInEaseOut))
		NSAnimationContext.currentContext().setDuration_(0.2)
		self.animator().setAlphaValue_(1)
		NSAnimationContext.endGrouping()
示例#3
0
	def fadeOut(self):
		global dismissing
		if dismissing: return
		dismissing = True
		NSAnimationContext.beginGrouping()
		NSAnimationContext.currentContext().setTimingFunction_(CAMediaTimingFunction.functionWithName_(kCAMediaTimingFunctionEaseInEaseOut))
		NSAnimationContext.currentContext().setDuration_(0.2)
		self.animator().setAlphaValue_(0.0)
		NSAnimationContext.endGrouping()
		NSTimer.scheduledTimerWithTimeInterval_target_selector_userInfo_repeats_(0.21, app, "terminate:", None, False)
示例#4
0
	def fadeOut(self):
		global dismissing
		if dismissing: return
		dismissing = True
		NSAnimationContext.beginGrouping()
		NSAnimationContext.currentContext().setTimingFunction_(CAMediaTimingFunction.functionWithName_(kCAMediaTimingFunctionEaseInEaseOut))
		NSAnimationContext.currentContext().setDuration_(0.2)
		self.animator().setAlphaValue_(0.0)
		NSAnimationContext.endGrouping()
		NSTimer.scheduledTimerWithTimeInterval_target_selector_userInfo_repeats_(0.21, app, "terminate:", None, False)