mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-10-10 10:42:19 +00:00
Make NSClipView obey the Draw Background checkbox in IB
This commit is contained in:
1 parent
ccb6b3b4a2
commit
dec7ca1e19
1 file changed
+7
-4
@@ -23,18 +23,21 @@
|
||||
@import <AppKit/CPClipView.j>
|
||||
|
||||
|
||||
var NSClipViewDrawBackgroundFlag = 0x04;
|
||||
|
||||
|
||||
@implementation CPClipView (CPCoding)
|
||||
|
||||
- (id)NS_initWithCoder:(CPCoder)aCoder
|
||||
{
|
||||
if (self = [super NS_initWithCoder:aCoder])
|
||||
{
|
||||
_documentView = [aCoder decodeObjectForKey:"NSDocView"];
|
||||
_documentView = [aCoder decodeObjectForKey:@"NSDocView"];
|
||||
|
||||
if ([aCoder containsValueForKey:"NSBGColor"])
|
||||
[self setBackgroundColor:[aCoder decodeObjectForKey:"NSBGColor"]];
|
||||
var flags = [aCoder decodeIntForKey:@"NScvFlags"];
|
||||
|
||||
//var flags = [aCoder decodeIntForKey:"NScvFlags"];
|
||||
if ((flags & NSClipViewDrawBackgroundFlag) && [aCoder containsValueForKey:@"NSBGColor"])
|
||||
[self setBackgroundColor:[aCoder decodeObjectForKey:@"NSBGColor"]];
|
||||
}
|
||||
|
||||
return self;
|
||||
|
||||
Reference in new issue
Block a user