diff --git a/clients/ios/Classes/FeedDetailTableCell.m b/clients/ios/Classes/FeedDetailTableCell.m index cd9ae9e31..fdfec74ba 100644 --- a/clients/ios/Classes/FeedDetailTableCell.m +++ b/clients/ios/Classes/FeedDetailTableCell.m @@ -62,6 +62,11 @@ static UIFont *indicatorFont = nil; cellContent.opaque = YES; self.isReadAvailable = YES; + // Clear out half pixel border on top and bottom that the draw code can't touch + UIView *selectedBackground = [[UIView alloc] init]; + [selectedBackground setBackgroundColor:[UIColor clearColor]]; + self.selectedBackgroundView = selectedBackground; + [self.contentView addSubview:cellContent]; } @@ -182,7 +187,7 @@ static UIFont *indicatorFont = nil; UIColor *backgroundColor; backgroundColor = cell.highlighted || cell.selected ? - UIColorFromRGB(0xFFFDEF) : UIColorFromRGB(0xf4f4f4); + UIColorFromLightSepiaMediumDarkRGB(0xFFFDEF, 0xFFFDEF, 0x808A90, 0x0F0F22) : UIColorFromRGB(0xf4f4f4); [backgroundColor set]; CGContextFillRect(context, r); @@ -213,25 +218,25 @@ static UIFont *indicatorFont = nil; UIFont *font; UIFontDescriptor *fontDescriptor = [cell fontDescriptorUsingPreferredSize:UIFontTextStyleCaption1]; - if (cell.isRead) { - font = [UIFont fontWithDescriptor:fontDescriptor size:0.0]; - textColor = UIColorFromRGB(0x808080); - } else { - UIFontDescriptor *boldFontDescriptor = [fontDescriptor fontDescriptorWithSymbolicTraits: UIFontDescriptorTraitBold]; - font = [UIFont fontWithDescriptor: boldFontDescriptor size:0.0]; - textColor = UIColorFromRGB(0x606060); - - } - if (cell.highlighted || cell.selected) { - textColor = UIColorFromRGB(0x686868); - } - NSMutableParagraphStyle *paragraphStyle = [[NSMutableParagraphStyle defaultParagraphStyle] mutableCopy]; paragraphStyle.lineBreakMode = NSLineBreakByWordWrapping; paragraphStyle.alignment = NSTextAlignmentLeft; paragraphStyle.lineHeightMultiple = 0.95f; if (cell.isRiverOrSocial) { + if (cell.isRead) { + font = [UIFont fontWithDescriptor:fontDescriptor size:0.0]; + textColor = UIColorFromLightSepiaMediumDarkRGB(0x808080, 0x808080, 0xB0B0B0, 0x707070); + } else { + UIFontDescriptor *boldFontDescriptor = [fontDescriptor fontDescriptorWithSymbolicTraits: UIFontDescriptorTraitBold]; + font = [UIFont fontWithDescriptor: boldFontDescriptor size:0.0]; + textColor = UIColorFromLightSepiaMediumDarkRGB(0x606060, 0x606060, 0xD0D0D0, 0x909090); + + } + if (cell.highlighted || cell.selected) { + textColor = UIColorFromLightSepiaMediumDarkRGB(0x686868, 0x686868, 0xA0A0A0, 0x808080); + } + NSInteger siteTitleY = (20 - font.pointSize/2)/2; [cell.siteTitle drawInRect:CGRectMake(leftMargin + 20, siteTitleY, rect.size.width - 20, 20) withAttributes:@{NSFontAttributeName: font, @@ -247,21 +252,20 @@ static UIFont *indicatorFont = nil; } [cell.siteFavicon drawInRect:CGRectMake(leftMargin, siteTitleY, 16.0, 16.0)]; - - if (cell.isRead) { - font = [UIFont fontWithDescriptor:fontDescriptor size:0.0]; - textColor = UIColorFromRGB(0x585858); - } else { - UIFontDescriptor *boldFontDescriptor = [fontDescriptor fontDescriptorWithSymbolicTraits: UIFontDescriptorTraitBold]; - font = [UIFont fontWithDescriptor: boldFontDescriptor size:0.0]; - textColor = UIColorFromRGB(0x333333); - } - if (cell.highlighted || cell.selected) { - textColor = UIColorFromRGB(0x686868); - } } // story title + if (cell.isRead) { + font = [UIFont fontWithDescriptor:fontDescriptor size:0.0]; + textColor = UIColorFromLightSepiaMediumDarkRGB(0x585858, 0x585858, 0x989898, 0x888888); + } else { + UIFontDescriptor *boldFontDescriptor = [fontDescriptor fontDescriptorWithSymbolicTraits: UIFontDescriptorTraitBold]; + font = [UIFont fontWithDescriptor: boldFontDescriptor size:0.0]; + textColor = UIColorFromLightSepiaMediumDarkRGB(0x333333, 0x333333, 0xB0B0B0, 0xCCCCCC); + } + if (cell.highlighted || cell.selected) { + textColor = UIColorFromLightDarkRGB(0x686868, 0xA0A0A0); + } CGSize theSize = [cell.storyTitle boundingRectWithSize:CGSizeMake(rect.size.width, cell.isShort ? font.pointSize*1.5 : font.pointSize*3) options:NSStringDrawingTruncatesLastVisibleLine|NSStringDrawingUsesLineFragmentOrigin @@ -312,17 +316,17 @@ static UIFont *indicatorFont = nil; } if (cell.isRead) { - textColor = UIColorFromRGB(0xB8B8B8); + textColor = UIColorFromLightSepiaMediumDarkRGB(0xB8B8B8, 0xB8B8B8, 0xA0A0A0, 0x707070); font = [UIFont fontWithDescriptor:fontDescriptor size:0.0]; } else { - textColor = UIColorFromRGB(0x404040); + textColor = UIColorFromLightSepiaMediumDarkRGB(0x404040, 0x404040, 0xC0C0C0, 0xB0B0B0); font = [UIFont fontWithDescriptor:fontDescriptor size:0.0]; } if (cell.highlighted || cell.selected) { if (cell.isRead) { - textColor = UIColorFromRGB(0xB8B8B8); + textColor = UIColorFromLightSepiaMediumDarkRGB(0xB8B8B8, 0xB8B8B8, 0xA0A0A0, 0x707070); } else { - textColor = UIColorFromRGB(0x686868); + textColor = UIColorFromLightSepiaMediumDarkRGB(0x686868, 0x686868, 0xA9A9A9, 0x989898); } } @@ -340,18 +344,18 @@ static UIFont *indicatorFont = nil; int storyAuthorDateY = r.size.height - 18; if (cell.isRead) { - textColor = UIColorFromLightDarkRGB(0xbabdd1, 0x3A708A); + textColor = UIColorFromLightSepiaMediumDarkRGB(0xBABDD1, 0xBABDD1, 0x52535d, 0x25262A); font = [UIFont fontWithName:@"Helvetica" size:10]; } else { - textColor = UIColorFromLightDarkRGB(0x262c6c, 0x3A708A); + textColor = UIColorFromLightSepiaMediumDarkRGB(0x262C6C, 0x262C6C, 0x363C5C, 0x21468e); font = [UIFont fontWithName:@"Helvetica-Bold" size:10]; } if (cell.highlighted || cell.selected) { if (cell.isRead) { - textColor = UIColorFromLightDarkRGB(0xaaadc1, 0x3A708A); + textColor = UIColorFromLightSepiaMediumDarkRGB(0xAAADC1, 0xAAADC1, 0x72738d, 0x35363A); } else { - textColor = UIColorFromLightDarkRGB(0x5a5d91, 0x3A708A); + textColor = UIColorFromLightSepiaMediumDarkRGB(0x5A5D91, 0x5A5D91, 0x666C8C, 0x11367e); } } @@ -368,17 +372,17 @@ static UIFont *indicatorFont = nil; // Story author if (cell.isRead) { - textColor = UIColorFromRGB(0xB8B8B8); + textColor = UIColorFromLightSepiaMediumDarkRGB(0xB8B8B8, 0xB8B8B8, 0x909090, 0x404040); font = [UIFont fontWithName:@"Helvetica-Bold" size:10]; } else { - textColor = UIColorFromRGB(0xA6A8A2); + textColor = UIColorFromLightSepiaMediumDarkRGB(0xA6A8A2, 0xA6A8A2, 0x909090, 0x505050); font = [UIFont fontWithName:@"Helvetica-Bold" size:10]; } if (cell.highlighted || cell.selected) { if (cell.isRead) { - textColor = UIColorFromRGB(0xA8A8A8); + textColor = UIColorFromLightSepiaMediumDarkRGB(0xA8A8A8, 0xA8A8A8, 0x999999, 0x303030); } else { - textColor = UIColorFromRGB(0x959595); + textColor = UIColorFromLightSepiaMediumDarkRGB(0x959595, 0x959595, 0xA0A0A0, 0x404040); } } diff --git a/clients/ios/Classes/FeedTableCell.m b/clients/ios/Classes/FeedTableCell.m index b2c3b18dc..206d7aac9 100644 --- a/clients/ios/Classes/FeedTableCell.m +++ b/clients/ios/Classes/FeedTableCell.m @@ -44,6 +44,11 @@ static UIFont *textFont = nil; cellContent = [[FeedTableCellView alloc] initWithFrame:self.frame]; cellContent.opaque = YES; + // Clear out half pixel border on top and bottom that the draw code can't touch + UIView *selectedBackground = [[UIView alloc] init]; + [selectedBackground setBackgroundColor:[UIColor clearColor]]; + self.selectedBackgroundView = selectedBackground; + [self.contentView addSubview:cellContent]; [self setupGestures]; @@ -141,19 +146,19 @@ static UIFont *textFont = nil; UIColor *backgroundColor; backgroundColor = cell.highlighted || cell.selected ? - UIColorFromRGB(0xFFFFD2) : + UIColorFromLightSepiaMediumDarkRGB(0xFFFFD2, 0xFFFFD2, 0x405060, 0x000022) : cell.isSocial ? UIColorFromRGB(0xE6ECE8) : cell.isSaved ? UIColorFromRGB(0xE9EBEE) : UIColorFromRGB(0xF7F8F5); [backgroundColor set]; - CGContextFillRect(context, r); + CGContextFillRect(context, self.frame); if (cell.highlighted || cell.selected) { // [NewsBlurAppDelegate fillGradient:CGRectMake(r.origin.x, r.origin.y + 1, r.size.width, r.size.height - 1) startColor:UIColorFromRGB(0xFFFFD2) endColor:UIColorFromRGB(0xFDED8D)]; // top border - UIColor *highlightBorderColor = UIColorFromRGB(0xE3D0AE); + UIColor *highlightBorderColor = UIColorFromLightDarkRGB(0xE3D0AE, 0x1F1F72); CGFloat lineWidth = 0.5f; CGContextSetStrokeColor(context, CGColorGetComponents([highlightBorderColor CGColor])); CGContextSetLineWidth(context, lineWidth); @@ -169,14 +174,14 @@ static UIFont *textFont = nil; CGContextAddLineToPoint(context, r.size.width, r.size.height - .5f*lineWidth); CGContextStrokePath(context); } - + [cell.unreadCount drawInRect:r ps:cell.positiveCount nt:cell.neutralCount listType:(cell.isSocial ? NBFeedListSocial : cell.isSaved ? NBFeedListSaved : NBFeedListFeed)]; UIColor *textColor = cell.highlighted || cell.selected ? UIColorFromRGB(NEWSBLUR_BLACK_COLOR): - UIColorFromRGB(0x3a3a3a); + UIColorFromRGB(0x3A3A3A); UIFont *font; UIFontDescriptor *fontDescriptor = [cell fontDescriptorUsingPreferredSize:UIFontTextStyleFootnote]; if (cell.negativeCount || cell.neutralCount || cell.positiveCount) { diff --git a/clients/ios/Classes/FolderTitleView.m b/clients/ios/Classes/FolderTitleView.m index c545a1d9a..c7edeaa91 100644 --- a/clients/ios/Classes/FolderTitleView.m +++ b/clients/ios/Classes/FolderTitleView.m @@ -86,14 +86,14 @@ // Background [NewsBlurAppDelegate fillGradient:rect - startColor:UIColorFromLightSepiaMediumDarkRGB(0xEAECE5, 0xffffc0, 0x666666, 0x333333) - endColor:UIColorFromLightSepiaMediumDarkRGB(0xDCDFD6, 0xffffd0, 0x777777, 0x444444)]; + startColor:UIColorFromLightSepiaMediumDarkRGB(0xEAECE5, 0xffffd0, 0x777777, 0x444444) + endColor:UIColorFromLightSepiaMediumDarkRGB(0xDCDFD6, 0xffffc0, 0x666666, 0x333333)]; // UIColor *backgroundColor = UIColorFromRGB(0xD7DDE6); // [backgroundColor set]; // CGContextFillRect(context, rect); // Borders - UIColor *topColor = UIColorFromRGB(0xFDFDFD); + UIColor *topColor = UIColorFromLightDarkRGB(0xFDFDFD, 0x474B4A); CGContextSetStrokeColor(context, CGColorGetComponents([topColor CGColor])); CGContextBeginPath(context); @@ -102,7 +102,7 @@ CGContextStrokePath(context); // bottom border - UIColor *bottomColor = UIColorFromRGB(0xB7BBAA); + UIColor *bottomColor = UIColorFromLightDarkRGB(0xB7BBAA, 0x0D0D0D); CGContextSetStrokeColor(context, CGColorGetComponents([bottomColor CGColor])); CGContextBeginPath(context); CGContextMoveToPoint(context, 0, rect.size.height-0.25f); @@ -110,7 +110,7 @@ CGContextStrokePath(context); // Folder title - UIColor *textColor = UIColorFromRGB(0x4D4D4D); + UIColor *textColor = UIColorFromRGB(0x4C4D4A); UIFontDescriptor *boldFontDescriptor = [self fontDescriptorUsingPreferredSize:UIFontTextStyleCaption1]; UIFont *font = [UIFont fontWithDescriptor: boldFontDescriptor size:0.0]; NSInteger titleOffsetY = ((rect.size.height - font.pointSize) / 2) - 1; diff --git a/clients/ios/Classes/NewsBlurAppDelegate.m b/clients/ios/Classes/NewsBlurAppDelegate.m index 63aae15ef..1f494efd8 100644 --- a/clients/ios/Classes/NewsBlurAppDelegate.m +++ b/clients/ios/Classes/NewsBlurAppDelegate.m @@ -784,6 +784,10 @@ } else { [feedsMenuViewController dismissViewControllerAnimated:NO completion:nil]; if (navigationController.isViewLoaded && navigationController.view.window) { + if ([self.navigationController visibleViewController] == loginViewController) { + NSLog(@"Already showing login!"); + return; + } [self.navigationController presentViewController:loginViewController animated:NO completion:nil]; } } diff --git a/clients/ios/Classes/NewsBlurViewController.m b/clients/ios/Classes/NewsBlurViewController.m index 33cb95370..5c89c2521 100644 --- a/clients/ios/Classes/NewsBlurViewController.m +++ b/clients/ios/Classes/NewsBlurViewController.m @@ -1086,7 +1086,7 @@ static UIFont *userLabelFont; CellIdentifier = @"FeedCellIdentifier"; } - FeedTableCell *cell = (FeedTableCell *)[tableView dequeueReusableCellWithIdentifier:CellIdentifier]; + FeedTableCell *cell = (FeedTableCell *)[tableView dequeueReusableCellWithIdentifier:CellIdentifier]; if (cell == nil) { cell = [[FeedTableCell alloc] initWithStyle:UITableViewCellStyleDefault @@ -1966,7 +1966,6 @@ heightForHeaderInSection:(NSInteger)section { userLabel.font = userLabelFont; userLabel.textColor = UIColorFromRGB(0x404040); userLabel.backgroundColor = [UIColor clearColor]; - userLabel.shadowColor = UIColorFromRGB(0xFAFAFA); userLabel.accessibilityLabel = [NSString stringWithFormat:@"Logged in as %@", appDelegate.activeUsername]; [userLabel sizeToFit]; [userInfoView addSubview:userLabel]; diff --git a/clients/ios/Classes/ThemeManager.m b/clients/ios/Classes/ThemeManager.m index eefc073ec..58fac8702 100644 --- a/clients/ios/Classes/ThemeManager.m +++ b/clients/ios/Classes/ThemeManager.m @@ -155,7 +155,7 @@ NSString * const ThemeStyleDark = @"dark"; CGFloat blue = ((rgbValue & 0xFF)) / 255.0; // Debug method to log all of the unique colors; leave commented out - // [self debugColor:rgbValue]; + // [self debugColor:rgbValue]; if ([theme isEqualToString:ThemeStyleDark]) { return [UIColor colorWithRed:1.0 - red green:1.0 - green blue:1.0 - blue alpha:1.0]; diff --git a/clients/ios/NewsBlur_Prefix.pch b/clients/ios/NewsBlur_Prefix.pch index 6869d16f6..9955fb746 100644 --- a/clients/ios/NewsBlur_Prefix.pch +++ b/clients/ios/NewsBlur_Prefix.pch @@ -7,7 +7,7 @@ #import #import -//#define DEBUG 1 +#define DEBUG 1 //#define PROD_DEBUG 1 #ifdef DEBUG diff --git a/clients/ios/Other Sources/PullToRefreshView.m b/clients/ios/Other Sources/PullToRefreshView.m index b2e81d8ae..3bc9b4bfa 100755 --- a/clients/ios/Other Sources/PullToRefreshView.m +++ b/clients/ios/Other Sources/PullToRefreshView.m @@ -65,7 +65,7 @@ scrollView = scroll; [scrollView addObserver:self forKeyPath:@"contentOffset" options:NSKeyValueObservingOptionNew context:NULL]; - UIColor *bgColor = UIColorFromRGB(0xF2F2F2); + UIColor *bgColor = UIColorFromRGB(0xF4F4F4); self.autoresizingMask = UIViewAutoresizingFlexibleWidth; self.backgroundColor = bgColor;