mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-08-26 13:37:03 +00:00
- Add bottom corner view and make it's background color a theme property - Make the border color themeable
46 lines
1.2 KiB
Plaintext
46 lines
1.2 KiB
Plaintext
@implementation DocumentView : CPView
|
|
{
|
|
BOOL _showHeaderView @accessors(property=showHeaderView);
|
|
|
|
CPView _headerView @accessors(property=headerView);
|
|
CPView _cornerView @accessors(property=cornerView);
|
|
}
|
|
|
|
- (void)awakeFromCib
|
|
{
|
|
[self setFrame:CGRectMake(0.0, 0.0, 2000.0, 2000.0)];
|
|
}
|
|
|
|
- (CPView)headerView
|
|
{
|
|
if (![self showHeaderView])
|
|
return nil;
|
|
|
|
if (!_headerView)
|
|
{
|
|
_headerView = [[CPView alloc] initWithFrame:CGRectMake(0.0, 0.0, CGRectGetWidth([self bounds]), 30.0)];
|
|
[_headerView setAutoresizingMask:CPViewWidthSizable];
|
|
[_headerView setAlphaValue:0.3];
|
|
[_headerView setBackgroundColor:[CPColor greenColor]];
|
|
}
|
|
|
|
return _headerView;
|
|
}
|
|
|
|
- (CPView)cornerView
|
|
{
|
|
if (![self showHeaderView])
|
|
return nil;
|
|
|
|
if (!_cornerView)
|
|
{
|
|
_cornerView = [[CPView alloc] initWithFrame:CGRectMake(0.0, 0.0, 15.0, 30.0)];
|
|
[_cornerView setAutoresizingMask:CPViewWidthSizable];
|
|
[_cornerView setAlphaValue:0.3];
|
|
[_cornerView setBackgroundColor:[CPColor blueColor]];
|
|
}
|
|
|
|
return _cornerView;
|
|
}
|
|
|
|
@end |