Skip to content

Commit

Permalink
padding handled at the parent view.
Browse files Browse the repository at this point in the history
  • Loading branch information
aaroncrespo committed Dec 15, 2011
1 parent ce52cf0 commit e8b3ead
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions WILLTabView/WILLTabCell.m
Original file line number Diff line number Diff line change
Expand Up @@ -22,14 +22,11 @@ - (void) drawWithFrame:(NSRect)cellFrame inView:(NSView *)controlView
for (int i =0 ;i < [self segmentCount]; i++) {
[self drawSegment:i inFrame:cellFrame withView:controlView];
}

//debugging drawing:
//[super drawWithFrame:cellFrame inView:controlView];
}

- (void) drawSegment:(NSInteger)segment inFrame:(NSRect)frame withView:(NSView *)controlView
{
frame.origin.x = (segment * TAB_WIDTH) + LEFT_PADDING;
frame.origin.x = (segment * TAB_WIDTH);
frame.origin.y = 0 ;
frame.size.width = TAB_WIDTH;
frame.size.height = controlView.frame.size.height;
Expand All @@ -53,7 +50,7 @@ - (void) drawSegment:(NSInteger)segment inFrame:(NSRect)frame withView:(NSView *
NSUInteger operation = (segment == highlightedSegment) ? NSCompositePlusDarker : NSCompositeSourceOver;

NSDrawThreePartImage(frame, leftImage, middleImage, rightImage,
NO, NSCompositeSourceOver, 1, NO);
NO, NSCompositeSourceOver, 1, YES);

[self setImage:[super imageForSegment:segment]];
[[self imageForSegment:segment] setFlipped:YES];
Expand Down

0 comments on commit e8b3ead

Please sign in to comment.