Skip to content

Commit

Permalink
Make NSClipView obey the Draw Background checkbox in IB
Browse files Browse the repository at this point in the history
  • Loading branch information
Aparajita Fishman committed Jul 14, 2012
1 parent ccb6b3b commit dec7ca1
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions Tools/nib2cib/NSClipView.j
Expand Up @@ -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;
Expand Down

0 comments on commit dec7ca1

Please sign in to comment.