mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-10-29 03:18:50 +00:00
Fix for corner view not drawing the line above the left edge of the scrollview. closes #864
This commit is contained in:
1 parent
7b6713aa90
commit
8737b1207f
2 files changed
+20
-3
No files matched your search
@@ -1437,9 +1437,11 @@ var themedButtonValues = nil,
|
||||
{
|
||||
var scrollerWidth = [CPScroller scrollerWidth],
|
||||
corner = [[_CPCornerView alloc] initWithFrame:CGRectMake(0.0, 0.0, scrollerWidth, 23.0)],
|
||||
normal = PatternColor("tableview-headerview.png", 1.0, 23.0);
|
||||
normal = PatternColor("tableview-headerview.png", 1.0, 23.0),
|
||||
dividerColor = [CPColor colorWithHexString:@"dce0e2"];
|
||||
|
||||
[corner setValue:normal forThemeAttribute:"background-color"];
|
||||
[corner setValue:dividerColor forThemeAttribute:"divider-color"];
|
||||
|
||||
return corner;
|
||||
}
|
||||
|
||||
+17
-2
@@ -33,8 +33,23 @@
|
||||
|
||||
+ (id)themeAttributes
|
||||
{
|
||||
return [CPDictionary dictionaryWithObjects:[[CPNull null]]
|
||||
forKeys:[@"background-color"]];
|
||||
return [CPDictionary dictionaryWithObjects:[[CPNull null], [CPNull null]]
|
||||
forKeys:[@"background-color", "divider-color"]];
|
||||
}
|
||||
|
||||
- (void)drawRect:(CGRect)aRect
|
||||
{
|
||||
var context = [[CPGraphicsContext currentContext] graphicsPort],
|
||||
color = [self currentValueForThemeAttribute:@"divider-color"];
|
||||
|
||||
CGContextSetLineWidth(context, 1);
|
||||
CGContextSetStrokeColor(context, [self currentValueForThemeAttribute:@"divider-color"]);
|
||||
|
||||
CGContextMoveToPoint(context, _CGRectGetMinX(aRect) + 0.5, ROUND(_CGRectGetMinY(aRect)));
|
||||
CGContextAddLineToPoint(context, _CGRectGetMinX(aRect) + 0.5, ROUND(_CGRectGetMaxY(aRect)));
|
||||
|
||||
CGContextClosePath(context);
|
||||
CGContextStrokePath(context);
|
||||
}
|
||||
|
||||
- (void)layoutSubviews
|
||||
|
||||
Reference in new issue
Block a user