-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathShroudDockTileView.m
44 lines (37 loc) · 924 Bytes
/
ShroudDockTileView.m
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
//
// ShroudDockTileView.m
// Shroud
//
// Created by Nicholas Riley on 9/5/10.
// Copyright 2010 Nicholas Riley. All rights reserved.
//
#import "ShroudDockTileView.h"
#import "ShroudBackdropColor.h"
@implementation ShroudDockTileView
+ (void)initialize;
{
[self exposeBinding:@"backgroundColor"];
}
- (id)initWithDockTile:(NSDockTile *)aDockTile;
{
if ( (self = [super initWithFrame: NSMakeRect(0, 0, dockTile.size.width, dockTile.size.height)]) != nil) {
dockTile = aDockTile;
[dockTile setContentView:self];
[self bindToShroudBackdropColor:@"backgroundColor"];
}
return self;
}
- (void)setBackgroundColor:(NSColor *)color;
{
if (color == backgroundColor)
return;
[backgroundColor release];
backgroundColor = [color retain];
[dockTile display];
}
- (void)drawRect:(NSRect)dirtyRect;
{
[backgroundColor set];
NSRectFill(dirtyRect);
}
@end