mirror of
https://github.com/viq/NewsBlur.git
synced 2025-11-01 09:09:16 +00:00
Fixing borders on story cells.
This commit is contained in:
parent
5766ca0bdf
commit
43f3d0037d
4 changed files with 29 additions and 17 deletions
|
|
@ -219,39 +219,48 @@ static UIFont *indicatorFont = nil;
|
|||
}
|
||||
CGContextSetLineWidth(context, 4.0f);
|
||||
CGContextBeginPath(context);
|
||||
CGContextMoveToPoint(context, 2.0f, 1.0f);
|
||||
CGContextAddLineToPoint(context, 2.0f, cell.frame.size.height - 1);
|
||||
CGContextMoveToPoint(context, 2.0f, 0);
|
||||
CGContextAddLineToPoint(context, 2.0f, cell.frame.size.height);
|
||||
CGContextStrokePath(context);
|
||||
|
||||
CGContextSetStrokeColor(context, CGColorGetComponents([cell.feedColorBar CGColor]));
|
||||
CGContextBeginPath(context);
|
||||
CGContextMoveToPoint(context, 6.0f, 1.0f);
|
||||
CGContextAddLineToPoint(context, 6.0, cell.frame.size.height - 1);
|
||||
CGContextMoveToPoint(context, 6.0f, 0);
|
||||
CGContextAddLineToPoint(context, 6.0, cell.frame.size.height);
|
||||
CGContextStrokePath(context);
|
||||
|
||||
// reset for borders
|
||||
|
||||
UIColor *white = UIColorFromRGB(0xffffff);
|
||||
CGContextSetAlpha(context, 1.0);
|
||||
CGContextSetLineWidth(context, 1.0f);
|
||||
if (cell.highlighted || cell.selected) {
|
||||
// top border
|
||||
UIColor *blue = UIColorFromRGB(0xF9F8F4);
|
||||
|
||||
CGContextSetStrokeColor(context, CGColorGetComponents([blue CGColor]));
|
||||
CGContextSetStrokeColor(context, CGColorGetComponents([white CGColor]));
|
||||
|
||||
CGContextSetLineWidth(context, 1.0f);
|
||||
CGContextBeginPath(context);
|
||||
CGContextMoveToPoint(context, 0, 0.5f);
|
||||
CGContextAddLineToPoint(context, cell.bounds.size.width, 0.5f);
|
||||
CGContextStrokePath(context);
|
||||
|
||||
CGFloat lineWidth = 0.5f;
|
||||
CGContextSetLineWidth(context, lineWidth);
|
||||
UIColor *blue = UIColorFromRGB(0xDFDDCF);
|
||||
|
||||
CGContextSetStrokeColor(context, CGColorGetComponents([blue CGColor]));
|
||||
|
||||
CGContextBeginPath(context);
|
||||
CGContextMoveToPoint(context, 0, 1.0f + 0.5f*lineWidth);
|
||||
CGContextAddLineToPoint(context, cell.bounds.size.width, 1.0f + 0.5f*lineWidth);
|
||||
CGContextStrokePath(context);
|
||||
|
||||
// bottom border
|
||||
CGContextBeginPath(context);
|
||||
CGContextMoveToPoint(context, 0, cell.bounds.size.height - .5f);
|
||||
CGContextAddLineToPoint(context, cell.bounds.size.width, cell.bounds.size.height - .5f);
|
||||
CGContextMoveToPoint(context, 0, cell.bounds.size.height - .5f*lineWidth);
|
||||
CGContextAddLineToPoint(context, cell.bounds.size.width, cell.bounds.size.height - .5f*lineWidth);
|
||||
CGContextStrokePath(context);
|
||||
} else {
|
||||
// top border
|
||||
UIColor *white = UIColorFromRGB(0xffffff);
|
||||
CGContextSetLineWidth(context, 1.0f);
|
||||
|
||||
CGContextSetStrokeColor(context, CGColorGetComponents([white CGColor]));
|
||||
|
||||
|
|
|
|||
|
|
@ -110,16 +110,19 @@ static UIFont *textFont = nil;
|
|||
|
||||
// top border
|
||||
UIColor *highlightBorderColor = UIColorFromRGB(0xE3D0AE);
|
||||
CGFloat lineWidth = 0.5f;
|
||||
CGContextSetStrokeColor(context, CGColorGetComponents([highlightBorderColor CGColor]));
|
||||
CGContextSetLineWidth(context, lineWidth);
|
||||
CGContextBeginPath(context);
|
||||
CGContextMoveToPoint(context, 0, 0.5f);
|
||||
CGContextMoveToPoint(context, 0, lineWidth*0.5f);
|
||||
CGContextAddLineToPoint(context, r.size.width, 0.5f);
|
||||
CGContextStrokePath(context);
|
||||
|
||||
// bottom border
|
||||
CGContextBeginPath(context);
|
||||
CGContextMoveToPoint(context, 0, r.size.height - .5f);
|
||||
CGContextAddLineToPoint(context, r.size.width, r.size.height - .5f);
|
||||
CGContextSetLineWidth(context, lineWidth);
|
||||
CGContextMoveToPoint(context, 0, r.size.height - .5f*lineWidth);
|
||||
CGContextAddLineToPoint(context, r.size.width, r.size.height - .5f*lineWidth);
|
||||
CGContextStrokePath(context);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,7 @@
|
|||
#import <UIKit/UIKit.h>
|
||||
#import "Underscore.h"
|
||||
|
||||
//#define DEBUG 1
|
||||
#define DEBUG 1
|
||||
|
||||
#ifdef DEBUG
|
||||
#define BACKGROUND_REFRESH_SECONDS -5
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@
|
|||
|
||||
#import "MCSwipeTableViewCell.h"
|
||||
|
||||
static CGFloat const kMCStop1 = 0.15; // Percentage limit to trigger the first action
|
||||
static CGFloat const kMCStop1 = 0.20; // Percentage limit to trigger the first action
|
||||
static CGFloat const kMCStop2 = 0.75; // Percentage limit to trigger the second action
|
||||
static CGFloat const kMCBounceAmplitude = 20.0; // Maximum bounce amplitude when using the MCSwipeTableViewCellModeSwitch mode
|
||||
static NSTimeInterval const kMCBounceDuration1 = 0.2; // Duration of the first part of the bounce animation
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue