draw the bottom corner in CPScrollView

This commit is contained in:
Klaas Pieter Annema committed 2010-09-10 14:20:17 +02:00
1 parent e77d28f761
commit bcacee2147
1 file changed
+26
+26
View File
@@ -327,6 +327,9 @@
[_headerClipView setFrame:headerClipViewFrame];
[_cornerView setFrame:[self _cornerViewFrame]];
if (shouldShowHorizontalScroller && shouldShowVerticalScroller)
[self setNeedsDisplay:YES];
--_recursionCount;
}
@@ -782,6 +785,29 @@
default:
break;
}
if (![[self verticalScroller] isHidden] && ![[self horizontalScroller] isHidden])
{
var verticalScrollerFrame = [[self verticalScroller] frame],
bottomCornerRect = CGRectMakeCopy(verticalScrollerFrame);
bottomCornerRect.origin.y = CGRectGetMaxY(verticalScrollerFrame);
bottomCornerRect.size.height = [CPScroller scrollerWidth];
CGContextSetFillColor(context, [CPColor colorWithRed:242.0 / 255.0 green:242.0 / 255.0 blue:243.0 / 255.0 alpha:1.0]);
CGContextFillRect(context, bottomCornerRect);
CGContextSetStrokeColor(context, [CPColor colorWithRed:184.0 / 255.0 green:184.0 / 255.0 blue:184.0 / 255.0 alpha:1.0]);
CGContextMoveToPoint(context, CGRectGetMinX(bottomCornerRect), CGRectGetMinY(bottomCornerRect));
CGContextAddLineToPoint(context, CGRectGetMaxX(bottomCornerRect), CGRectGetMinY(bottomCornerRect));
CGContextStrokePath(context);
CGContextMoveToPoint(context, CGRectGetMinX(bottomCornerRect), CGRectGetMinY(bottomCornerRect));
CGContextAddLineToPoint(context, CGRectGetMinX(bottomCornerRect), CGRectGetMaxY(bottomCornerRect));
CGContextStrokePath(context);
}
}
- (void)_drawGrayBezelInContext:(CGContext)context bounds:(CGRect)aRect