-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathThumbAnimAppDelegate.m
More file actions
44 lines (36 loc) · 986 Bytes
/
ThumbAnimAppDelegate.m
File metadata and controls
44 lines (36 loc) · 986 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
//
// ThumbAnimAppDelegate.m
// ThumbAnim
//
// Created by Uncle MiF on 4/12/10.
// Copyright 2010 Deep IT. All rights reserved.
//
#import "ThumbAnimAppDelegate.h"
#import "NSWindow+ThumbAnimation.h"
@implementation ThumbAnimAppDelegate
@synthesize window;
- (void)applicationDidFinishLaunching:(NSNotification *)aNotification
{
[self.window setLevel:NSNormalWindowLevel];
[self.window setAlphaValue:0.0];
[self.window orderFront:self];
[[self.window animator] setAlphaValue:1.0];
}
-(IBAction)thumbClick:(id)sender
{
NSRect fromRect = [thumb frame];
fromRect.origin.x += [window frame].origin.x;
fromRect.origin.y += [window frame].origin.y;
[document animateFromFrame:fromRect toFrame:[document frame]];
[self performSelector:@selector(hideTmplChooser) withObject:nil afterDelay:0.5];
}
-(void)hideTmplChooser
{
[[self.window animator] setAlphaValue:0.0];
}
-(BOOL)windowShouldClose:(id)sender
{
[[self.window animator] setAlphaValue:1.0];
return YES;
}
@end