iOS: done #825 (dark mode)

This commit is contained in:
David Sinclair 2015-12-07 16:09:49 -08:00
parent ec59aa9924
commit af2ab36297
75 changed files with 1966 additions and 223 deletions

View file

@ -32,7 +32,7 @@
[self.contentView addSubview:favicon];
UILabel *activity = [[UILabel alloc] initWithFrame:CGRectZero];
activity.backgroundColor = [UIColor whiteColor];
activity.backgroundColor = UIColorFromRGB(0xffffff);
self.activityLabel = activity;
[self.contentView addSubview:activity];
@ -189,6 +189,7 @@
range:dateRange];
}
self.activityLabel.backgroundColor = UIColorFromRGB(NEWSBLUR_WHITE_COLOR);
self.activityLabel.attributedText = attrStr;
[self.activityLabel sizeToFit];

View file

@ -43,6 +43,7 @@
self.activitiesTable.delegate = self;
self.activitiesTable.frame = CGRectMake(0, 0, self.frame.size.width, self.frame.size.height);;
self.activitiesTable.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
self.activitiesTable.backgroundColor = UIColorFromRGB(NEWSBLUR_WHITE_COLOR);
[self addSubview:self.activitiesTable];
}
@ -243,6 +244,7 @@
UIView *myBackView = [[UIView alloc] initWithFrame:self.frame];
myBackView.backgroundColor = UIColorFromRGB(NEWSBLUR_HIGHLIGHT_COLOR);
cell.selectedBackgroundView = myBackView;
cell.backgroundColor = UIColorFromRGB(NEWSBLUR_WHITE_COLOR);
}
return cell;
@ -317,6 +319,7 @@
reuseIdentifier:@"NoReuse"];
cell.selectionStyle = UITableViewCellSelectionStyleNone;
cell.backgroundColor = UIColorFromRGB(NEWSBLUR_WHITE_COLOR);
if (self.pageFinished) {
UIImage *img = [UIImage imageNamed:@"fleuron.png"];
@ -331,7 +334,7 @@
fleuron.frame = CGRectMake(0, 0, self.frame.size.width, height);
fleuron.contentMode = UIViewContentModeCenter;
[cell.contentView addSubview:fleuron];
fleuron.backgroundColor = [UIColor whiteColor];
fleuron.backgroundColor = UIColorFromRGB(NEWSBLUR_WHITE_COLOR);
} else {
cell.textLabel.text = @"Loading...";

View file

@ -48,7 +48,7 @@ static UIFont *indicatorFont = nil;
if (highlighted) {
backgroundColor = UIColorFromRGB(NEWSBLUR_HIGHLIGHT_COLOR);
} else {
backgroundColor = [UIColor whiteColor];
backgroundColor = UIColorFromRGB(NEWSBLUR_WHITE_COLOR);
}
[backgroundColor set];

View file

@ -76,6 +76,9 @@
self.activeTerm_ = @"";
self.searchResults_ = [[NSMutableDictionary alloc] init];
self.folderPicker.delegate = self;
[super viewDidLoad];
}
@ -85,6 +88,11 @@
[self.folderPicker setHidden:YES];
[self.siteScrollView setAlpha:0];
[self.activityIndicator stopAnimating];
self.view.backgroundColor = UIColorFromRGB(NEWSBLUR_WHITE_COLOR);
self.siteTable.backgroundColor = UIColorFromRGB(NEWSBLUR_WHITE_COLOR);
self.folderPicker.backgroundColor = UIColorFromRGB(NEWSBLUR_WHITE_COLOR);
[super viewWillAppear:animated];
}
@ -384,14 +392,19 @@ numberOfRowsInComponent:(NSInteger)component {
return [[self folders] count] + 1;
}
- (NSString *)pickerView:(UIPickerView *)pickerView
titleForRow:(NSInteger)row
forComponent:(NSInteger)component {
- (NSAttributedString *)pickerView:(UIPickerView *)pickerView
attributedTitleForRow:(NSInteger)row
forComponent:(NSInteger)component {
NSString *title = nil;
NSDictionary *attributes = @{NSForegroundColorAttributeName : UIColorFromRGB(NEWSBLUR_BLACK_COLOR)};
if (row == 0) {
return @"— Top Level —";
title = @"— Top Level —";
} else {
return [[self folders] objectAtIndex:row-1];
title = [[self folders] objectAtIndex:row - 1];
}
return [[NSAttributedString alloc] initWithString:title attributes:attributes];
}
- (void)pickerView:(UIPickerView *)pickerView
@ -473,10 +486,14 @@ numberOfRowsInComponent:(NSInteger)component {
}
cell.feedTitle.text = [result objectForKey:@"label"];
cell.feedTitle.textColor = UIColorFromRGB(NEWSBLUR_BLACK_COLOR);
cell.feedUrl.text = [result objectForKey:@"value"];
cell.feedUrl.textColor = UIColorFromFixedRGB(NEWSBLUR_LINK_COLOR);
cell.feedSubs.text = [[NSString stringWithFormat:@"%@ subscriber%@",
[NSString stringWithFormat:@"%@", [numberFormatter stringFromNumber:theScore]], subs == 1 ? @"" : @"s"] uppercaseString];
cell.feedSubs.textColor = UIColorFromRGB(0x808080);
cell.feedFavicon.image = faviconImage;
cell.backgroundColor = UIColorFromRGB(NEWSBLUR_WHITE_COLOR);
return cell;
}

View file

@ -20,5 +20,7 @@
- (void)informMessage:(NSString *)message;
- (void)informLoadingMessage:(NSString *)message;
- (void)updateTheme;
@end

View file

@ -105,11 +105,17 @@
[HUD hide:YES afterDelay:2];
}
- (void)updateTheme {
// Subclasses should override this, calling super, to update their nav bar, table, etc
}
#pragma mark -
#pragma mark UIViewController
- (void) viewDidLoad {
[super viewDidLoad];
[[ThemeManager themeManager] addThemeGestureRecognizerToView:self.view];
}
- (void) viewDidUnload {

View file

@ -34,10 +34,13 @@
@property (nonatomic) IBOutlet UINavigationBar *topToolbar;
@property (nonatomic) IBOutlet UIToolbar *toolbar;
@property (nonatomic) IBOutlet UISegmentedControl *segmentedButton;
@property (nonatomic) IBOutlet UIImageView *logoImageView;
- (IBAction)doLogout:(id)sender;
- (void)refreshStories;
- (void)refreshInteractions;
- (void)refreshActivity;
- (IBAction)tapSegmentedButton:(id)sender;
- (void)updateTheme;
@end

View file

@ -14,6 +14,7 @@
#import "UserProfileViewController.h"
#import "TMCache.h"
#import "StoriesCollection.h"
#import "UISearchBar+Field.h"
#define FEEDBACK_URL @"http://www.newsblur.com/about"
@ -80,6 +81,8 @@
[self addChildViewController:self.storiesModule];
[self.storiesModule didMoveToParentViewController:self];
}
[self updateLogo];
}
- (void)viewWillAppear:(BOOL)animated {
@ -94,6 +97,33 @@
[appDelegate confirmLogout];
}
- (void)updateLogo {
if ([ThemeManager themeManager].isDarkTheme) {
self.logoImageView.image = [UIImage imageNamed:@"logo_newsblur_blur-dark.png"];
} else {
self.logoImageView.image = [UIImage imageNamed:@"logo_newsblur_blur.png"];
}
}
- (void)updateTheme {
self.topToolbar.barTintColor = UIColorFromRGB(0xE3E6E0);
self.toolbar.barTintColor = UIColorFromRGB(0xE3E6E0);
self.storiesModule.searchBar.backgroundColor = UIColorFromRGB(0xE3E6E0);
self.storiesModule.searchBar.tintColor = UIColorFromRGB(0xffffff);
self.storiesModule.searchBar.nb_searchField.textColor = UIColorFromRGB(0x0);
self.storiesModule.storyTitlesTable.backgroundColor = UIColorFromRGB(NEWSBLUR_WHITE_COLOR);
self.interactionsModule.interactionsTable.backgroundColor = UIColorFromRGB(NEWSBLUR_WHITE_COLOR);
self.activitiesModule.activitiesTable.backgroundColor = UIColorFromRGB(NEWSBLUR_WHITE_COLOR);
[self.storiesModule.storyTitlesTable reloadData];
[self.interactionsModule.interactionsTable reloadData];
[self.activitiesModule.activitiesTable reloadData];
[self updateLogo];
}
# pragma mark
# pragma mark Navigation

View file

@ -203,11 +203,13 @@
cell.frame = CGRectMake(0, 0, 240, kMenuOptionHeight);
cell.selectionStyle = UITableViewCellSelectionStyleNone;
cell.separatorInset = UIEdgeInsetsZero;
cell.backgroundColor = UIColorFromRGB(0xffffff);
orderSegmentedControl.frame = CGRectMake(8, 7, cell.frame.size.width - 8*2,
kMenuOptionHeight - 7*2);
[orderSegmentedControl setTitle:[@"Newest first" uppercaseString] forSegmentAtIndex:0];
[orderSegmentedControl setTitle:[@"Oldest" uppercaseString] forSegmentAtIndex:1];
self.orderSegmentedControl.backgroundColor = UIColorFromRGB(0xeeeeee);
[cell addSubview:orderSegmentedControl];
@ -219,11 +221,13 @@
cell.frame = CGRectMake(0, 0, 240, kMenuOptionHeight);
cell.selectionStyle = UITableViewCellSelectionStyleNone;
cell.separatorInset = UIEdgeInsetsZero;
cell.backgroundColor = UIColorFromRGB(0xffffff);
readFilterSegmentedControl.frame = CGRectMake(8, 7, cell.frame.size.width - 8*2,
kMenuOptionHeight - 7*2);
[readFilterSegmentedControl setTitle:[@"All stories" uppercaseString] forSegmentAtIndex:0];
[readFilterSegmentedControl setTitle:[@"Unread only" uppercaseString] forSegmentAtIndex:1];
self.readFilterSegmentedControl.backgroundColor = UIColorFromRGB(0xeeeeee);
[cell addSubview:readFilterSegmentedControl];

View file

@ -340,18 +340,18 @@ static UIFont *indicatorFont = nil;
int storyAuthorDateY = r.size.height - 18;
if (cell.isRead) {
textColor = UIColorFromRGB(0xbabdd1);
textColor = UIColorFromLightDarkRGB(0xbabdd1, 0x3A708A);
font = [UIFont fontWithName:@"Helvetica" size:10];
} else {
textColor = UIColorFromRGB(0x262c6c);
textColor = UIColorFromLightDarkRGB(0x262c6c, 0x3A708A);
font = [UIFont fontWithName:@"Helvetica-Bold" size:10];
}
if (cell.highlighted || cell.selected) {
if (cell.isRead) {
textColor = UIColorFromRGB(0xaaadc1);
textColor = UIColorFromLightDarkRGB(0xaaadc1, 0x3A708A);
} else {
textColor = UIColorFromRGB(0x5a5d91);
textColor = UIColorFromLightDarkRGB(0x5a5d91, 0x3A708A);
}
}

View file

@ -37,6 +37,7 @@
#import "DashboardViewController.h"
#import "StoriesCollection.h"
#import "NSNull+JSON.h"
#import "UISearchBar+Field.h"
#define kTableViewRowHeight 46;
#define kTableViewRiverRowHeight 68;
@ -101,8 +102,9 @@
initWithFrame:CGRectMake(0, 0, CGRectGetWidth(self.storyTitlesTable.frame), 44.)];
self.searchBar.delegate = self;
[self.searchBar setReturnKeyType:UIReturnKeySearch];
[self.searchBar setBackgroundColor:UIColorFromRGB(0xDCDFD6)];
[self.searchBar setTintColor:[UIColor whiteColor]];
self.searchBar.backgroundColor = UIColorFromRGB(0xE3E6E0);
self.searchBar.tintColor = UIColorFromRGB(0x0);
self.searchBar.nb_searchField.textColor = UIColorFromRGB(0x0);
[self.searchBar setSearchBarStyle:UISearchBarStyleMinimal];
[self.searchBar setAutocapitalizationType:UITextAutocapitalizationTypeNone];
self.storyTitlesTable.tableHeaderView = self.searchBar;
@ -141,7 +143,9 @@
doubleTapGesture.numberOfTapsRequired = 2;
[self.storyTitlesTable addGestureRecognizer:doubleTapGesture];
doubleTapGesture.delegate = self;
[[ThemeManager themeManager] addThemeGestureRecognizerToView:self.storyTitlesTable];
self.notifier = [[NBNotifier alloc] initWithTitle:@"Fetching stories..." inView:self.view];
[self.view addSubview:self.notifier];
}
@ -205,6 +209,12 @@
return YES;
}
- (BOOL)searchBarShouldBeginEditing:(UISearchBar *)searchBar {
[self updateTheme];
return YES;
}
- (void)searchBarTextDidBeginEditing:(UISearchBar *)searchBar {
[self.searchBar setShowsCancelButton:YES animated:YES];
}
@ -1342,7 +1352,7 @@
NSScanner *scannerBorder = [NSScanner scannerWithString:faviconColor];
[scannerBorder scanHexInt:&colorBorder];
cell.feedColorBar = UIColorFromRGB(colorBorder);
cell.feedColorBar = UIColorFromFixedRGB(colorBorder);
// feed color bar border
NSString *faviconFade = [feed valueForKey:@"favicon_color"];
@ -1351,7 +1361,7 @@
}
scannerBorder = [NSScanner scannerWithString:faviconFade];
[scannerBorder scanHexInt:&colorBorder];
cell.feedColorBarTopBorder = UIColorFromRGB(colorBorder);
cell.feedColorBarTopBorder = UIColorFromFixedRGB(colorBorder);
// favicon
cell.siteFavicon = [appDelegate getFavicon:feedIdStr];
@ -2062,6 +2072,32 @@ didEndSwipingSwipingWithState:(MCSwipeTableViewCellState)state
}
}
- (void)updateTheme {
[super updateTheme];
self.navigationController.navigationBar.tintColor = UIColorFromRGB(NEWSBLUR_BLACK_COLOR);
self.navigationController.navigationBar.barTintColor = UIColorFromRGB(0xE3E6E0);
self.navigationController.toolbar.barTintColor = UIColorFromRGB(0xE3E6E0);
self.searchBar.backgroundColor = UIColorFromRGB(0xE3E6E0);
self.searchBar.tintColor = UIColorFromRGB(0xffffff);
self.searchBar.nb_searchField.textColor = UIColorFromRGB(NEWSBLUR_BLACK_COLOR);
if (self.isPhoneOrCompact) {
self.navigationItem.titleView = [appDelegate makeFeedTitle:storiesCollection.activeFeed];
}
if ([ThemeManager themeManager].isDarkTheme) {
self.searchBar.keyboardAppearance = UIKeyboardAppearanceDark;
} else {
self.searchBar.keyboardAppearance = UIKeyboardAppearanceDefault;
}
self.storyTitlesTable.backgroundColor = UIColorFromRGB(0xf4f4f4);
self.storyTitlesTable.separatorColor = UIColorFromRGB(0xE9E8E4);
[self.storyTitlesTable reloadData];
}
#pragma mark -
#pragma mark Story Actions - save

View file

@ -175,7 +175,7 @@ static UIFont *textFont = nil;
UIColor *textColor = cell.highlighted || cell.selected ?
[UIColor blackColor]:
UIColorFromRGB(NEWSBLUR_BLACK_COLOR):
UIColorFromRGB(0x3a3a3a);
UIFont *font;
UIFontDescriptor *fontDescriptor = [cell fontDescriptorUsingPreferredSize:UIFontTextStyleFootnote];

View file

@ -407,7 +407,7 @@
NSScanner *scannerBorder = [NSScanner scannerWithString:faviconColor];
[scannerBorder scanHexInt:&colorBorder];
cell.feedColorBar = UIColorFromRGB(colorBorder);
cell.feedColorBar = UIColorFromFixedRGB(colorBorder);
// feed color bar border
NSString *faviconFade = [feed valueForKey:@"favicon_border"];
@ -416,7 +416,7 @@
}
scannerBorder = [NSScanner scannerWithString:faviconFade];
[scannerBorder scanHexInt:&colorBorder];
cell.feedColorBarTopBorder = UIColorFromRGB(colorBorder);
cell.feedColorBarTopBorder = UIColorFromFixedRGB(colorBorder);
// favicon

View file

@ -86,8 +86,8 @@
// Background
[NewsBlurAppDelegate fillGradient:rect
startColor:UIColorFromRGB(0xEAECE5)
endColor:UIColorFromRGB(0xDCDFD6)];
startColor:UIColorFromLightDarkRGB(0xEAECE5, 0x333333)
endColor:UIColorFromLightDarkRGB(0xDCDFD6, 0x444444)];
// UIColor *backgroundColor = UIColorFromRGB(0xD7DDE6);
// [backgroundColor set];
// CGContextFillRect(context, rect);
@ -110,7 +110,7 @@
CGContextStrokePath(context);
// Folder title
UIColor *textColor = [UIColor colorWithRed:0.3 green:0.3 blue:0.3 alpha:1.0];
UIColor *textColor = UIColorFromRGB(0x4D4D4D);
UIFontDescriptor *boldFontDescriptor = [self fontDescriptorUsingPreferredSize:UIFontTextStyleCaption1];
UIFont *font = [UIFont fontWithDescriptor: boldFontDescriptor size:0.0];
NSInteger titleOffsetY = ((rect.size.height - font.pointSize) / 2) - 1;

View file

@ -15,8 +15,11 @@
@property (nonatomic) IBOutlet NewsBlurAppDelegate *appDelegate;
@property (nonatomic) IBOutlet UISegmentedControl *fontSizeSegment;
@property (nonatomic) IBOutlet UISegmentedControl *lineSpacingSegment;
@property (nonatomic) IBOutlet UISegmentedControl *themeSegment;
@property (nonatomic) IBOutlet UITableView *menuTableView;
- (IBAction)changeFontSize:(id)sender;
- (IBAction)changeLineSpacing:(id)sender;
- (IBAction)changeTheme:(id)sender;
@end

View file

@ -95,9 +95,20 @@
}
}
NSString *theme = [ThemeManager themeManager].theme;
if ([theme isEqualToString:@"sepia"]) {
self.themeSegment.selectedSegmentIndex = 1;
} else if ([theme isEqualToString:@"medium"]) {
self.themeSegment.selectedSegmentIndex = 2;
} else if ([theme isEqualToString:@"dark"]) {
self.themeSegment.selectedSegmentIndex = 3;
} else {
self.themeSegment.selectedSegmentIndex = 0;
}
[self.menuTableView reloadData];
self.preferredContentSize = CGSizeMake(240.0, 259.0);
self.preferredContentSize = CGSizeMake(240.0, 296.0);
}
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {
@ -173,10 +184,35 @@
[userPreferences synchronize];
}
- (IBAction)changeTheme:(id)sender {
NSUserDefaults *userPreferences = [NSUserDefaults standardUserDefaults];
NSString *theme = ThemeStyleLight;
switch ([sender selectedSegmentIndex]) {
case 1:
theme = ThemeStyleSepia;
break;
case 2:
theme = ThemeStyleMedium;
break;
case 3:
theme = ThemeStyleDark;
break;
default:
break;
}
[ThemeManager themeManager].theme = theme;
self.menuTableView.backgroundColor = UIColorFromRGB(0xECEEEA);
self.menuTableView.separatorColor = UIColorFromRGB(0x909090);
[self.menuTableView reloadData];
[userPreferences synchronize];
}
#pragma mark - Table view data source
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section {
return 8;
return 9;
}
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
@ -188,6 +224,8 @@
return [self makeFontSizeTableCell];
} else if (indexPath.row == 7) {
return [self makeLineSpacingTableCell];
} else if (indexPath.row == 8) {
return [self makeThemeTableCell];
}
if (cell == nil) {
@ -195,7 +233,13 @@
initWithStyle:UITableViewCellStyleDefault
reuseIdentifier:CellIndentifier];
}
cell.textLabel.textColor = UIColorFromRGB(0x303030);
cell.textLabel.highlightedTextColor = UIColorFromRGB(0x303030);
cell.textLabel.shadowColor = UIColorFromRGB(0xF0F0F0);
cell.backgroundView.backgroundColor = UIColorFromRGB(0xFFFFFF);
cell.selectedBackgroundView.backgroundColor = UIColorFromRGB(0xECEEEA);
if (indexPath.row == 0) {
bool isSaved = [[self.appDelegate.activeStory objectForKey:@"starred"] boolValue];
if (isSaved) {
@ -303,6 +347,7 @@
cell.frame = CGRectMake(0, 0, 240, kMenuOptionHeight);
cell.selectionStyle = UITableViewCellSelectionStyleNone;
cell.separatorInset = UIEdgeInsetsZero;
cell.backgroundColor = UIColorFromRGB(0xffffff);
self.fontSizeSegment.frame = CGRectMake(8, 4, cell.frame.size.width - 8*2, kMenuOptionHeight - 4*2);
[self.fontSizeSegment setTitle:@"XS" forSegmentAtIndex:0];
@ -311,6 +356,7 @@
[self.fontSizeSegment setTitle:@"L" forSegmentAtIndex:3];
[self.fontSizeSegment setTitle:@"XL" forSegmentAtIndex:4];
[self.fontSizeSegment setTintColor:UIColorFromRGB(0x738570)];
self.fontSizeSegment.backgroundColor = UIColorFromRGB(0xeeeeee);
[self.fontSizeSegment setTitleTextAttributes:@{NSFontAttributeName:[UIFont fontWithName:@"Helvetica-Bold" size:11.0f]} forState:UIControlStateNormal];
[self.fontSizeSegment setContentOffset:CGSizeMake(0, 1) forSegmentAtIndex:0];
[self.fontSizeSegment setContentOffset:CGSizeMake(0, 1) forSegmentAtIndex:1];
@ -328,6 +374,7 @@
cell.frame = CGRectMake(0, 0, 240, kMenuOptionHeight);
cell.selectionStyle = UITableViewCellSelectionStyleNone;
cell.separatorInset = UIEdgeInsetsZero;
cell.backgroundColor = UIColorFromRGB(0xffffff);
self.lineSpacingSegment.frame = CGRectMake(8, 4, cell.frame.size.width - 8*2, kMenuOptionHeight - 4*2);
[self.lineSpacingSegment setImage:[UIImage imageNamed:@"line_spacing_xs"] forSegmentAtIndex:0];
@ -336,10 +383,50 @@
[self.lineSpacingSegment setImage:[UIImage imageNamed:@"line_spacing_l"] forSegmentAtIndex:3];
[self.lineSpacingSegment setImage:[UIImage imageNamed:@"line_spacing_xl"] forSegmentAtIndex:4];
[self.lineSpacingSegment setTintColor:UIColorFromRGB(0x738570)];
self.lineSpacingSegment.backgroundColor = UIColorFromRGB(0xeeeeee);
[cell addSubview:self.lineSpacingSegment];
return cell;
}
- (UITableViewCell *)makeThemeTableCell {
UITableViewCell *cell = [[UITableViewCell alloc] init];
cell.frame = CGRectMake(0, 0, 240, kMenuOptionHeight);
cell.selectionStyle = UITableViewCellSelectionStyleNone;
cell.separatorInset = UIEdgeInsetsZero;
cell.backgroundColor = UIColorFromRGB(0xffffff);
UIImage *lightImage = [self themeImageWithName:@"theme_color_light" selected:self.themeSegment.selectedSegmentIndex == 0];
UIImage *sepiaImage = [self themeImageWithName:@"theme_color_sepia" selected:self.themeSegment.selectedSegmentIndex == 1];
UIImage *mediumImage = [self themeImageWithName:@"theme_color_medium" selected:self.themeSegment.selectedSegmentIndex == 2];
UIImage *darkImage = [self themeImageWithName:@"theme_color_dark" selected:self.themeSegment.selectedSegmentIndex == 3];
self.themeSegment.frame = CGRectMake(8, 4, cell.frame.size.width - 8*2, kMenuOptionHeight - 4*2);
[self.themeSegment setImage:lightImage forSegmentAtIndex:0];
[self.themeSegment setImage:sepiaImage forSegmentAtIndex:1];
[self.themeSegment setImage:mediumImage forSegmentAtIndex:2];
[self.themeSegment setImage:darkImage forSegmentAtIndex:3];
UIGraphicsBeginImageContextWithOptions(CGSizeMake(1, self.themeSegment.frame.size.height), NO, 0.0);
UIImage *blankImage = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
[self.themeSegment setDividerImage:blankImage forLeftSegmentState:UIControlStateNormal rightSegmentState:UIControlStateNormal barMetrics:UIBarMetricsDefault];
self.themeSegment.tintColor = [UIColor clearColor];
self.themeSegment.backgroundColor = [UIColor clearColor];
[cell addSubview:self.themeSegment];
return cell;
}
- (UIImage *)themeImageWithName:(NSString *)name selected:(BOOL)selected {
if (selected) {
name = [name stringByAppendingString:@"-sel"];
}
return [[UIImage imageNamed:name] imageWithRenderingMode:UIImageRenderingModeAlwaysOriginal];
}
@end

View file

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.iPad.XIB" version="3.0" toolsVersion="9059" systemVersion="15B42" targetRuntime="iOS.CocoaTouch.iPad" propertyAccessControl="none">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.iPad.XIB" version="3.0" toolsVersion="9060" systemVersion="15B42" targetRuntime="iOS.CocoaTouch.iPad" propertyAccessControl="none">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9049"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9051"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="FontSettingsViewController">
@ -10,6 +10,7 @@
<outlet property="fontSizeSegment" destination="28" id="34"/>
<outlet property="lineSpacingSegment" destination="4iD-hO-qU2" id="K0A-P6-riY"/>
<outlet property="menuTableView" destination="35" id="38"/>
<outlet property="themeSegment" destination="9Zd-0Z-SQt" id="V1G-LP-kgy"/>
<outlet property="view" destination="2" id="3"/>
</connections>
</placeholder>
@ -48,6 +49,20 @@
<action selector="changeLineSpacing:" destination="-1" eventType="valueChanged" id="3hE-hD-2Aq"/>
</connections>
</segmentedControl>
<segmentedControl opaque="NO" contentMode="scaleToFill" contentHorizontalAlignment="left" contentVerticalAlignment="top" segmentControlStyle="bar" selectedSegmentIndex="2" id="9Zd-0Z-SQt">
<rect key="frame" x="3" y="97" width="234" height="29"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxX="YES" flexibleMaxY="YES"/>
<animations/>
<segments>
<segment title="" image="theme_color_light.png"/>
<segment title="" image="theme_color_sepia.png"/>
<segment title="" image="theme_color_medium.png"/>
<segment title="" image="theme_color_dark.png"/>
</segments>
<connections>
<action selector="changeTheme:" destination="-1" eventType="valueChanged" id="d7d-9h-DPN"/>
</connections>
</segmentedControl>
<tableView clipsSubviews="YES" contentMode="scaleToFill" bounces="NO" scrollEnabled="NO" showsHorizontalScrollIndicator="NO" showsVerticalScrollIndicator="NO" style="plain" separatorStyle="default" rowHeight="44" sectionHeaderHeight="22" sectionFooterHeight="22" id="35">
<rect key="frame" x="0.0" y="-1" width="240" height="223"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
@ -71,5 +86,9 @@
<image name="line_spacing_s.png" width="32" height="32"/>
<image name="line_spacing_xl.png" width="32" height="32"/>
<image name="line_spacing_xs.png" width="32" height="32"/>
<image name="theme_color_dark.png" width="64" height="64"/>
<image name="theme_color_light.png" width="64" height="64"/>
<image name="theme_color_medium.png" width="64" height="64"/>
<image name="theme_color_sepia.png" width="64" height="64"/>
</resources>
</document>

View file

@ -12,6 +12,7 @@
#import "ASIHTTPRequest.h"
#import "ProfileBadge.h"
#import "MBProgressHUD.h"
#import "UISearchBar+Field.h"
@implementation UINavigationController (DelegateAutomaticDismissKeyboard)
- (BOOL)disablesAutomaticKeyboardDismissal {
@ -70,6 +71,10 @@
- (void)viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
self.view.backgroundColor = UIColorFromRGB(NEWSBLUR_WHITE_COLOR);
self.friendsTable.backgroundColor = UIColorFromRGB(NEWSBLUR_WHITE_COLOR);
[self.friendSearchBar becomeFirstResponder];
}
@ -239,7 +244,7 @@ viewForHeaderInSection:(NSInteger)section {
headerLabel.backgroundColor = [UIColor clearColor];
headerLabel.opaque = NO;
headerLabel.textColor = [UIColor colorWithRed:0.3 green:0.3 blue:0.3 alpha:1.0];
headerLabel.highlightedTextColor = [UIColor whiteColor];
headerLabel.highlightedTextColor = UIColorFromRGB(NEWSBLUR_WHITE_COLOR);
headerLabel.font = [UIFont boldSystemFontOfSize:11];
headerLabel.frame = CGRectMake(36.0, 1.0, 286.0, headerLabelHeight);
headerLabel.shadowColor = [UIColor colorWithRed:.94 green:0.94 blue:0.97 alpha:1.0];
@ -367,8 +372,10 @@ viewForHeaderInSection:(NSInteger)section {
// [cell.contentView addSubview:badge];
// }
// }
cell.backgroundColor = UIColorFromRGB(NEWSBLUR_WHITE_COLOR);
cell.selectionStyle = UITableViewCellSelectionStyleNone;
return cell;
}

View file

@ -33,7 +33,7 @@
[self.contentView addSubview:avatar];
UILabel *interaction = [[UILabel alloc] initWithFrame:CGRectZero];
interaction.backgroundColor = [UIColor whiteColor];
interaction.backgroundColor = UIColorFromRGB(0xffffff);
// interaction.automaticallyAddLinksForType = NO;
self.interactionLabel = interaction;
[self.contentView addSubview:interaction];
@ -162,6 +162,7 @@
range:dateRange];
}
self.interactionLabel.backgroundColor = UIColorFromRGB(NEWSBLUR_WHITE_COLOR);
self.interactionLabel.attributedText = attrStr;
[self.interactionLabel sizeToFit];

View file

@ -37,7 +37,6 @@
return self;
}
- (void)layoutSubviews {
[super layoutSubviews];
self.interactionsTable = [[UITableView alloc] init];
@ -45,6 +44,7 @@
self.interactionsTable.delegate = self;
self.interactionsTable.frame = CGRectMake(0, 0, self.frame.size.width, self.frame.size.height);
self.interactionsTable.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
self.interactionsTable.backgroundColor = UIColorFromRGB(NEWSBLUR_WHITE_COLOR);
[self addSubview:self.interactionsTable];
}
@ -234,6 +234,8 @@
cell.accessoryType = UITableViewCellAccessoryNone;
}
cell.backgroundColor = UIColorFromRGB(NEWSBLUR_WHITE_COLOR);
// update the cell information
[cell setInteraction:interaction withWidth: self.frame.size.width - 20];
[cell layoutSubviews];
@ -292,6 +294,7 @@
reuseIdentifier:@"NoReuse"];
cell.selectionStyle = UITableViewCellSelectionStyleNone;
cell.backgroundColor = UIColorFromRGB(NEWSBLUR_WHITE_COLOR);
if (self.pageFinished) {
UIImage *img = [UIImage imageNamed:@"fleuron.png"];
@ -307,7 +310,7 @@
fleuron.frame = CGRectMake(0, 0, self.frame.size.width, height);
fleuron.contentMode = UIViewContentModeCenter;
[cell.contentView addSubview:fleuron];
fleuron.backgroundColor = [UIColor whiteColor];
fleuron.backgroundColor = UIColorFromRGB(NEWSBLUR_WHITE_COLOR);
} else {
cell.textLabel.text = @"Loading...";

View file

@ -15,11 +15,6 @@
self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
if (self) {
// Initialization code
self.textLabel.backgroundColor = [UIColor clearColor];
self.textLabel.textColor = UIColorFromRGB(0x303030);
self.textLabel.highlightedTextColor = UIColorFromRGB(0x303030);
self.textLabel.shadowColor = UIColorFromRGB(0xF0F0F0);
self.textLabel.shadowOffset = CGSizeMake(0, 1);
self.textLabel.font = [UIFont fontWithName:@"Helvetica-Bold" size:14.0];
[self setSeparatorInset:UIEdgeInsetsMake(0, 38, 0, 0)];
UIView *background = [[UIView alloc] init];
@ -42,6 +37,14 @@
self.textLabel.frame = CGRectMake(self.imageView.frame.size.width, 0,
self.frame.size.width - self.imageView.frame.size.width,
self.frame.size.height);
self.textLabel.backgroundColor = [UIColor clearColor];
self.textLabel.textColor = UIColorFromRGB(0x303030);
self.textLabel.highlightedTextColor = UIColorFromRGB(0x303030);
self.textLabel.shadowColor = UIColorFromRGB(0xF0F0F0);
self.textLabel.shadowOffset = CGSizeMake(0, 1);
self.backgroundView.backgroundColor = UIColorFromRGB(0xFFFFFF);
self.selectedBackgroundView.backgroundColor = UIColorFromRGB(0xECEEEA);
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {

View file

@ -29,6 +29,8 @@
- (void)syncNextPreviousButtons;
- (void)updateTheme;
- (void)layoutDashboardScreen;
- (void)layoutFeedDetailScreen;
- (void)adjustFeedDetailScreenForStoryTitles;

View file

@ -155,7 +155,7 @@
UIView * storyTitlesPlaceholder = [[UIView alloc] initWithFrame:CGRectZero];
storyTitlesPlaceholder.autoresizingMask = UIViewAutoresizingFlexibleWidth | UIViewAutoresizingFlexibleHeight;
storyTitlesPlaceholder.autoresizesSubviews = YES;
storyTitlesPlaceholder.backgroundColor = [UIColor whiteColor];
storyTitlesPlaceholder.backgroundColor = UIColorFromRGB(NEWSBLUR_WHITE_COLOR);
self.storyTitlesStub = storyTitlesPlaceholder;
@ -285,6 +285,14 @@
return NB_DEFAULT_MASTER_WIDTH;
}
- (void)updateTheme {
self.masterNavigationController.navigationBar.tintColor = UIColorFromRGB(0x0);
self.masterNavigationController.navigationBar.barTintColor = UIColorFromRGB(0xE3E6E0);
self.storyNavigationController.navigationBar.tintColor = UIColorFromRGB(0x0);
self.storyNavigationController.navigationBar.barTintColor = UIColorFromRGB(0xE3E6E0);
}
# pragma mark Modals and Popovers
- (void)showPopoverWithViewController:(UIViewController *)viewController contentSize:(CGSize)contentSize barButtonItem:(UIBarButtonItem *)barButtonItem {

View file

@ -16,7 +16,7 @@
{
self = [super initWithFrame:frame];
if (self) {
self.backgroundColor = UIColorFromRGB(0x5C89C9);
self.backgroundColor = UIColorFromLightDarkRGB(0x5C89C9, 0x666666);
animating = YES;
}
return self;
@ -36,12 +36,12 @@
- (void)animate {
if (!self.window || !self.superview.window) return;
if (!animating) return;
self.backgroundColor = UIColorFromRGB(0x5C89C9);
self.backgroundColor = UIColorFromLightDarkRGB(0x5C89C9, 0x666666);
[UIView animateWithDuration:.650f delay:0.f options:nil animations:^{
self.backgroundColor = UIColorFromRGB(0xE1EBFF);
self.backgroundColor = UIColorFromLightDarkRGB(0xE1EBFF, 0x222222);
} completion:^(BOOL finished) {
[UIView animateWithDuration:1.05f animations:^{
self.backgroundColor = UIColorFromRGB(0x5C89C9);
self.backgroundColor = UIColorFromLightDarkRGB(0x5C89C9, 0x666666);
} completion:^(BOOL finished) {
[self animate];
}];

View file

@ -84,10 +84,10 @@
[_txtLabel setFont:[UIFont fontWithName: @"Helvetica" size: 16]];
[_txtLabel setBackgroundColor:[UIColor clearColor]];
[_txtLabel setTextColor:[UIColor whiteColor]];
[_txtLabel setTextColor:UIColorFromRGB(NEWSBLUR_WHITE_COLOR)];
_txtLabel.layer.shadowOffset =CGSizeMake(0, -0.5);
_txtLabel.layer.shadowColor = [UIColor blackColor].CGColor;
_txtLabel.layer.shadowColor = UIColorFromRGB(NEWSBLUR_BLACK_COLOR).CGColor;
_txtLabel.layer.shadowOpacity = 1.0;
_txtLabel.layer.shadowRadius = 1;

View file

@ -88,7 +88,6 @@ SFSafariViewControllerDelegate> {
IASKAppSettingsViewController *preferencesViewController;
WYPopoverController *popoverController;
UIColor *tintColor;
NSString * activeUsername;
NSString * activeUserProfileId;
NSString * activeUserProfileName;
@ -188,7 +187,6 @@ SFSafariViewControllerDelegate> {
@property (nonatomic, readwrite) TMCache *cachedFavicons;
@property (nonatomic, readwrite) TMCache *cachedStoryImages;
@property (nonatomic) UIColor *tintColor;
@property (readwrite) NSString * activeUsername;
@property (readwrite) NSString * activeUserProfileId;
@property (readwrite) NSString * activeUserProfileName;

View file

@ -61,6 +61,7 @@
#import "NBURLCache.h"
#import "NBActivityItemProvider.h"
#import "NSNull+JSON.h"
#import "UISearchBar+Field.h"
#import <float.h>
@interface NewsBlurAppDelegate () <UIViewControllerTransitioningDelegate>
@ -109,7 +110,6 @@
@synthesize firstTimeUserAddFriendsViewController;
@synthesize firstTimeUserAddNewsBlurViewController;
@synthesize tintColor;
@synthesize feedDetailPortraitYCoordinate;
@synthesize cachedFavicons;
@synthesize cachedStoryImages;
@ -204,11 +204,7 @@
[window makeKeyAndVisible];
[self setTintColor:UIColorFromRGB(0x8F918B)];
[[UINavigationBar appearance] setBarTintColor:UIColorFromRGB(0xE3E6E0)];
[[UIToolbar appearance] setBarTintColor: UIColorFromRGB(0xE3E6E0)];
[[UISegmentedControl appearance] setTintColor:UIColorFromRGB(0x8F918B)];
// [[UISegmentedControl appearance] setBackgroundColor:UIColorFromRGB(0x8F918B)];
[[ThemeManager themeManager] prepareForWindow:self.window];
[self createDatabaseConnection];
dispatch_async(dispatch_get_global_queue(DISPATCH_QUEUE_PRIORITY_DEFAULT,
@ -458,6 +454,7 @@
- (void)showPreferences {
if (!preferencesViewController) {
preferencesViewController = [[IASKAppSettingsViewController alloc] init];
[[ThemeManager themeManager] addThemeGestureRecognizerToView:self.preferencesViewController.view];
}
preferencesViewController.delegate = self.feedsViewController;
@ -475,6 +472,12 @@
if (system_font_enabled) {
[hiddenSet addObjectsFromArray:@[@"feed_list_font_size"]];
}
BOOL theme_auto_toggle = [[NSUserDefaults standardUserDefaults] boolForKey:@"theme_auto_toggle"];
if (theme_auto_toggle) {
[hiddenSet addObjectsFromArray:@[@"theme_style", @"theme_gesture"]];
} else {
[hiddenSet addObjectsFromArray:@[@"theme_auto_brightness"]];
}
preferencesViewController.hiddenKeys = hiddenSet;
[[NSUserDefaults standardUserDefaults] setObject:@"Delete offline stories..."
forKey:@"offline_cache_empty_stories"];
@ -482,7 +485,7 @@
UINavigationController *navController = [[UINavigationController alloc] initWithRootViewController:preferencesViewController];
self.modalNavigationController = navController;
self.modalNavigationController.navigationBar.translucent = NO;
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) {
[masterContainerViewController dismissViewControllerAnimated:NO completion:nil];
self.modalNavigationController.modalPresentationStyle = UIModalPresentationFormSheet;
@ -2236,7 +2239,7 @@
NSScanner *scanner = [NSScanner scannerWithString:colorString];
[scanner scanHexInt:&color];
return UIColorFromRGB(color);
return UIColorFromFixedRGB(color);
}
+ (UIView *)makeGradientView:(CGRect)rect startColor:(NSString *)start endColor:(NSString *)end borderColor:(NSString *)borderColor {
@ -2255,7 +2258,7 @@
CALayer *whiteBackground = [CALayer layer];
whiteBackground.frame = CGRectMake(0, 1, rect.size.width, rect.size.height-1);
whiteBackground.backgroundColor = [[UIColor whiteColor] colorWithAlphaComponent:0.7].CGColor;
whiteBackground.backgroundColor = [UIColorFromRGB(NEWSBLUR_WHITE_COLOR) colorWithAlphaComponent:0.7].CGColor;
[gradientView.layer addSublayer:whiteBackground];
[gradientView.layer addSublayer:gradient];
@ -2303,12 +2306,12 @@
UIColor *borderColor = [NewsBlurAppDelegate faviconColor:[feed objectForKey:@"favicon_border"]];
titleLabel.textColor = lightText ?
[UIColor whiteColor] :
[UIColor blackColor];
UIColorFromRGB(NEWSBLUR_WHITE_COLOR) :
UIColorFromRGB(NEWSBLUR_BLACK_COLOR);
titleLabel.shadowColor = lightText ? borderColor : fadeColor;
} else {
titleLabel.textColor = [UIColor whiteColor];
titleLabel.shadowColor = [UIColor blackColor];
titleLabel.textColor = UIColorFromRGB(NEWSBLUR_WHITE_COLOR);
titleLabel.shadowColor = UIColorFromRGB(NEWSBLUR_BLACK_COLOR);
}
titleLabel.frame = CGRectMake(32, 1, rect.size.width-32, 20);

View file

@ -106,6 +106,8 @@ static UIFont *userLabelFont;
popoverClass = [WYPopoverController class];
pull = [[PullToRefreshView alloc] initWithScrollView:self.feedTitlesTable];
self.pull.tintColor = UIColorFromLightDarkRGB(0x0, 0xffffff);
self.pull.backgroundColor = UIColorFromRGB(0xE3E6E0);
[pull setDelegate:self];
[self.feedTitlesTable addSubview:pull];
@ -157,13 +159,14 @@ static UIFont *userLabelFont;
longpress.delegate = self;
[self.feedTitlesTable addGestureRecognizer:longpress];
[[ThemeManager themeManager] addThemeGestureRecognizerToView:self.feedTitlesTable];
self.notifier = [[NBNotifier alloc] initWithTitle:@"Fetching stories..."
inView:self.view
withOffset:CGPointMake(0, self.feedViewToolbar.frame.size.height)];
[self.view insertSubview:self.notifier belowSubview:self.feedViewToolbar];
UIColor *bgColor = [UIColor colorWithRed:0.95 green:0.95 blue:0.95 alpha:1.0];
self.feedTitlesTable.backgroundColor = bgColor;
self.feedTitlesTable.backgroundColor = UIColorFromRGB(0xf4f4f4);
self.feedTitlesTable.separatorColor = [UIColor clearColor];
userAvatarButton.customView.hidden = YES;
@ -957,6 +960,10 @@ static UIFont *userLabelFont;
#pragma mark -
#pragma mark Preferences
- (void)settingsViewControllerWillAppear:(IASKAppSettingsViewController *)sender {
[[ThemeManager themeManager] updatePreferencesTheme];
}
- (void)settingsViewControllerDidEnd:(IASKAppSettingsViewController*)sender {
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) {
[appDelegate.masterContainerViewController dismissViewControllerAnimated:YES completion:nil];
@ -978,22 +985,57 @@ static UIFont *userLabelFont;
}
}
- (void)updateTheme {
[super updateTheme];
self.navigationController.navigationBar.tintColor = UIColorFromRGB(0x0);
self.navigationController.navigationBar.barTintColor = UIColorFromRGB(0xE3E6E0);
self.navigationController.toolbar.barTintColor = UIColorFromRGB(0xE3E6E0);
self.feedViewToolbar.barTintColor = UIColorFromRGB(0xE3E6E0);
self.pull.tintColor = UIColorFromLightDarkRGB(0x0, 0xffffff);
self.pull.backgroundColor = UIColorFromRGB(0xE3E6E0);
[self layoutHeaderCounts:nil];
self.feedTitlesTable.backgroundColor = UIColorFromRGB(0xf4f4f4);
[self.feedTitlesTable reloadData];
}
- (void)updateThemeBrightness {
if ([[ThemeManager themeManager] autoChangeTheme]) {
[[ThemeManager themeManager] updateTheme];
}
}
- (void)updateThemeStyle {
[[ThemeManager themeManager] updateTheme];
}
- (void)settingDidChange:(NSNotification*)notification {
if ([notification.object isEqual:@"offline_allowed"]) {
BOOL enabled = (BOOL)[[notification.userInfo objectForKey:@"offline_allowed"] intValue];
NSString *identifier = notification.object;
if ([identifier isEqual:@"offline_allowed"]) {
BOOL enabled = [[notification.userInfo objectForKey:@"offline_allowed"] boolValue];
[appDelegate.preferencesViewController setHiddenKeys:enabled ? nil :
[NSSet setWithObjects:@"offline_image_download",
@"offline_download_connection",
@"offline_store_limit",
nil] animated:YES];
} else if ([notification.object isEqual:@"use_system_font_size"]) {
BOOL enabled = (BOOL)[[notification.userInfo objectForKey:@"use_system_font_size"] intValue];
} else if ([identifier isEqual:@"use_system_font_size"]) {
BOOL enabled = [[notification.userInfo objectForKey:@"use_system_font_size"] boolValue];
[appDelegate.preferencesViewController setHiddenKeys:!enabled ? nil :
[NSSet setWithObjects:@"feed_list_font_size",
nil] animated:YES];
} else if ([notification.object isEqual:@"feed_list_font_size"]) {
} else if ([identifier isEqual:@"feed_list_font_size"]) {
[self resizeFontSize];
} else if ([notification.object isEqual:@"story_list_preview_images"]) {
} else if ([identifier isEqual:@"theme_auto_toggle"]) {
BOOL enabled = [[notification.userInfo objectForKey:@"theme_auto_toggle"] boolValue];
[appDelegate.preferencesViewController setHiddenKeys:!enabled ? [NSSet setWithObject:@"theme_auto_brightness"] : [NSSet setWithObjects:@"theme_style", @"theme_gesture", nil] animated:YES];
} else if ([identifier isEqual:@"theme_auto_brightness"]) {
[self updateThemeBrightness];
} else if ([identifier isEqual:@"theme_style"]) {
[self updateThemeStyle];
} else if ([identifier isEqual:@"story_list_preview_images"]) {
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) {
[appDelegate.dashboardViewController.storiesModule reloadData];
}
@ -1554,7 +1596,7 @@ heightForHeaderInSection:(NSInteger)section {
self.viewShowingAllFeeds = NO;
[appDelegate setSelectedIntelligence:1];
}
[self calculateFeedLocations];
[self.feedTitlesTable reloadData];

View file

@ -85,6 +85,8 @@
}
}
self.backgroundColor = UIColorFromRGB(NEWSBLUR_WHITE_COLOR);
if (showStats) {
shouldShowStats = showStats;
}
@ -117,7 +119,7 @@
// username
UILabel *user = [[UILabel alloc] initWithFrame:CGRectZero];
user.textColor = UIColorFromRGB(NEWSBLUR_LINK_COLOR);
user.textColor = UIColorFromFixedRGB(NEWSBLUR_LINK_COLOR);
user.font = [UIFont fontWithName:@"Helvetica-Bold" size:18];
user.backgroundColor = [UIColor clearColor];
self.username = user;
@ -129,12 +131,12 @@
UIButton *follow = [UIButton buttonWithType:UIButtonTypeCustom];
follow.frame = CGRectMake(10, 96, 80, 24);
follow.layer.borderColor = [UIColor grayColor].CGColor;
follow.layer.borderColor = UIColorFromRGB(0x808080).CGColor;
follow.layer.borderWidth = 0.5f;
follow.layer.cornerRadius = 10.0f;
[follow setTitleColor:UIColorFromRGB(kFollowTextColor) forState:UIControlStateNormal];
follow.backgroundColor = UIColorFromRGB(kFollowColor);
[follow setTitleColor:UIColorFromFixedRGB(kFollowTextColor) forState:UIControlStateNormal];
follow.backgroundColor = UIColorFromFixedRGB(kFollowColor);
// check follow button status
if ([[profile objectForKey:@"yourself"] intValue]) {
@ -142,8 +144,8 @@
follow.enabled = NO;
} else if ([[profile objectForKey:@"followed_by_you"] intValue]) {
[follow setTitle:@"Following" forState:UIControlStateNormal];
follow.backgroundColor = UIColorFromRGB(kFollowingColor);
[follow setTitleColor:UIColorFromRGB(kFollowingTextColor) forState:UIControlStateNormal];
follow.backgroundColor = UIColorFromFixedRGB(kFollowingColor);
[follow setTitleColor:UIColorFromFixedRGB(kFollowingTextColor) forState:UIControlStateNormal];
} else {
[follow setTitle:@"Follow" forState:UIControlStateNormal];
}
@ -224,15 +226,15 @@
if (shouldShowStats) {
UIView *horizontalBar = [[UIView alloc] initWithFrame:CGRectMake(0, kTopBadgeHeight, width, 1)];
horizontalBar.backgroundColor = [UIColor lightGrayColor];
horizontalBar.backgroundColor = UIColorFromRGB(0xCBCBCB);
[self.contentView addSubview:horizontalBar];
UIView *leftVerticalBar = [[UIView alloc] initWithFrame:CGRectMake((width/3), kTopBadgeHeight, 1, 55)];
leftVerticalBar.backgroundColor = [UIColor lightGrayColor];
leftVerticalBar.backgroundColor = UIColorFromRGB(0xCBCBCB);
[self.contentView addSubview:leftVerticalBar];
UIView *rightVerticalBar = [[UIView alloc] initWithFrame:CGRectMake((width/3) * 2, kTopBadgeHeight, 1, 55)];
rightVerticalBar.backgroundColor = [UIColor lightGrayColor];
rightVerticalBar.backgroundColor = UIColorFromRGB(0xCBCBCB);
[self.contentView addSubview:rightVerticalBar];
// Shared
@ -242,6 +244,7 @@
shared.text = sharedStr;
shared.textAlignment = NSTextAlignmentCenter;
shared.font = [UIFont boldSystemFontOfSize:20];
shared.textColor = UIColorFromRGB(NEWSBLUR_BLACK_COLOR);
shared.backgroundColor = [UIColor clearColor];
[self.contentView addSubview:shared];
@ -251,6 +254,7 @@
sharedLabel.text = sharedLabelStr;
sharedLabel.textAlignment = NSTextAlignmentCenter;
sharedLabel.font = [UIFont fontWithName:@"Helvetica" size:12];
sharedLabel.textColor = UIColorFromRGB(NEWSBLUR_BLACK_COLOR);
sharedLabel.backgroundColor = [UIColor clearColor];
[self.contentView addSubview:sharedLabel];
@ -262,6 +266,7 @@
following.text = followingStr;
following.textAlignment = NSTextAlignmentCenter;
following.font = [UIFont boldSystemFontOfSize:20];
following.textColor = UIColorFromRGB(NEWSBLUR_BLACK_COLOR);
following.backgroundColor = [UIColor clearColor];
[self.contentView addSubview:following];
@ -270,6 +275,7 @@
followingLabel.text = followingLabelStr;
followingLabel.textAlignment = NSTextAlignmentCenter;
followingLabel.font = [UIFont fontWithName:@"Helvetica" size:12];
followingLabel.textColor = UIColorFromRGB(NEWSBLUR_BLACK_COLOR);
followingLabel.backgroundColor = [UIColor clearColor];
[self.contentView addSubview:followingLabel];
@ -281,6 +287,7 @@
followers.text = followersStr;
followers.textAlignment = NSTextAlignmentCenter;
followers.font = [UIFont boldSystemFontOfSize:20];
followers.textColor = UIColorFromRGB(NEWSBLUR_BLACK_COLOR);
followers.backgroundColor = [UIColor clearColor];
[self.contentView addSubview:followers];
@ -290,6 +297,7 @@
followersLabel.text = followersLabelStr;
followersLabel.textAlignment = NSTextAlignmentCenter;
followersLabel.font = [UIFont fontWithName:@"Helvetica" size:12];
followersLabel.textColor = UIColorFromRGB(NEWSBLUR_BLACK_COLOR);
followersLabel.backgroundColor = [UIColor clearColor];
[self.contentView addSubview:followersLabel];
}
@ -350,8 +358,8 @@
}
[self.followButton setTitle:@"Following" forState:UIControlStateNormal];
self.followButton.backgroundColor = UIColorFromRGB(kFollowColor);
[self.followButton setTitleColor:UIColorFromRGB(kFollowTextColor) forState:UIControlStateNormal];
self.followButton.backgroundColor = UIColorFromFixedRGB(kFollowColor);
[self.followButton setTitleColor:UIColorFromFixedRGB(kFollowTextColor) forState:UIControlStateNormal];
[appDelegate reloadFeedsView:NO];
NSMutableDictionary *newProfile = [self.activeProfile mutableCopy];
@ -382,8 +390,8 @@
NSLog(@"results %@", results);
[self.followButton setTitle:@"Follow" forState:UIControlStateNormal];
self.followButton.backgroundColor = UIColorFromRGB(kFollowingColor);
[self.followButton setTitleColor:UIColorFromRGB(kFollowingTextColor) forState:UIControlStateNormal];
self.followButton.backgroundColor = UIColorFromFixedRGB(kFollowingColor);
[self.followButton setTitleColor:UIColorFromFixedRGB(kFollowingTextColor) forState:UIControlStateNormal];
[appDelegate reloadFeedsView:NO];

View file

@ -70,7 +70,7 @@
// Do any additional setup after loading the view from its nib.
commentField.layer.borderWidth = 1.0f;
commentField.layer.cornerRadius = 4;
commentField.layer.borderColor = [[UIColor grayColor] CGColor];
commentField.layer.borderColor = [UIColorFromRGB(0x808080) CGColor];
twitterButton.layer.borderWidth = 1.0f;
twitterButton.layer.cornerRadius = 1.0f;
@ -135,6 +135,9 @@
[self adjustCommentField:CGSizeZero];
[self adjustShareButtons];
self.view.backgroundColor = UIColorFromRGB(NEWSBLUR_WHITE_COLOR);
self.commentField.layer.borderColor = [UIColorFromRGB(0x808080) CGColor];
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone) {
self.storyTitle.text = [[appDelegate.activeStory objectForKey:@"story_title"]
stringByDecodingHTMLEntities];

View file

@ -25,7 +25,7 @@
[self.contentView addSubview:favicon];
UILabel *activity = [[UILabel alloc] initWithFrame:CGRectZero];
activity.backgroundColor = [UIColor whiteColor];
activity.backgroundColor = UIColorFromRGB(0xffffff);
self.activityLabel = activity;
[self.contentView addSubview:activity];
@ -62,6 +62,7 @@
} else {
self.activityLabel.backgroundColor = UIColorFromRGB(0xf6f6f6);
}
self.backgroundColor = [UIColor clearColor];
self.activityLabel.backgroundColor = [UIColor clearColor];
}

View file

@ -25,7 +25,7 @@
[self.contentView addSubview:favicon];
UILabel *interaction = [[UILabel alloc] initWithFrame:CGRectZero];
interaction.backgroundColor = [UIColor whiteColor];
interaction.backgroundColor = UIColorFromRGB(NEWSBLUR_WHITE_COLOR);
self.interactionLabel = interaction;
[self.contentView addSubview:interaction];

View file

@ -107,7 +107,9 @@
doubleDoubleTapGesture.numberOfTapsRequired = 2;
doubleDoubleTapGesture.delegate = self;
[self.webView addGestureRecognizer:doubleDoubleTapGesture];
[[ThemeManager themeManager] addThemeGestureRecognizerToView:self.webView];
self.pageIndex = -2;
self.inTextView = NO;
@ -387,11 +389,17 @@
appDelegate.storiesCollection.isReadView) ?
@"NB-river" : @"NB-non-river";
NSString *themeStyle = [ThemeManager themeManager].themeCSSSuffix;
if (themeStyle.length) {
themeStyle = [NSString stringWithFormat:@"<link rel=\"stylesheet\" type=\"text/css\" href=\"storyDetailView%@.css\">", themeStyle];
}
// set up layout values based on iPad/iPhone
headerString = [NSString stringWithFormat:@
"<link rel=\"stylesheet\" type=\"text/css\" href=\"storyDetailView.css\" >"
"<link rel=\"stylesheet\" type=\"text/css\" href=\"storyDetailView.css\">%@"
"<meta name=\"viewport\" id=\"viewport\" content=\"width=%d, initial-scale=1.0, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no\"/>",
contentWidth];
themeStyle, contentWidth];
footerString = [NSString stringWithFormat:@
"<script src=\"zepto.js\"></script>"
"<script src=\"fitvid.js\"></script>"

View file

@ -50,6 +50,8 @@
@property (nonatomic, strong) IBOutlet UIPageControl *pageControl;
@property (nonatomic, strong) IBOutlet UIActivityIndicatorView *loadingIndicator;
@property (nonatomic) IBOutlet UIImageView *textStorySendBackgroundImageView;
@property (nonatomic) IBOutlet UIImageView *prevNextBackgroundImageView;
@property (nonatomic) IBOutlet THCircularProgressView *circularProgressView;
@property (nonatomic) IBOutlet UIButton *buttonPrevious;
@property (nonatomic) IBOutlet UIButton *buttonNext;
@ -69,6 +71,7 @@
@property (nonatomic) IBOutlet UIBarButtonItem *fontSettingsButton;
@property (nonatomic) IBOutlet UIBarButtonItem *originalStoryButton;
@property (nonatomic, strong) IBOutlet UIBarButtonItem *subscribeButton;
@property (nonatomic) IBOutlet UIImageView *dragBarImageView;
@property (readwrite) BOOL traversePinned;
@property (readwrite) BOOL traverseFloating;
@property (readwrite) CGFloat inTouchMove;
@ -115,6 +118,7 @@
- (void)setFontStyle:(NSString *)fontStyle;
- (void)changeFontSize:(NSString *)fontSize;
- (void)changeLineSpacing:(NSString *)lineSpacing;
- (void)drawStories;
- (void)showShareHUD:(NSString *)msg;
- (void)showFetchingTextNotifier;
- (void)hideNotifier;

View file

@ -205,6 +205,7 @@
- (void)viewWillAppear:(BOOL)animated {
[super viewWillAppear:animated];
[self updateTraverseBackground];
[self setNextPreviousButtons];
[self setTextButton];
@ -505,6 +506,22 @@
return UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPhone || self.appDelegate.isCompactWidth;
}
- (void)updateTraverseBackground {
self.textStorySendBackgroundImageView.image = [[ThemeManager themeManager] themedImage:[UIImage imageNamed:@"traverse_background.png"]];
self.prevNextBackgroundImageView.image = [[ThemeManager themeManager] themedImage:[UIImage imageNamed:@"traverse_background.png"]];
self.dragBarImageView.image = [[ThemeManager themeManager] themedImage:[UIImage imageNamed:@"drag_icon.png"]];
self.bottomSize.backgroundColor = UIColorFromRGB(NEWSBLUR_WHITE_COLOR);
}
- (void)updateTheme {
[super updateTheme];
[self updateTraverseBackground];
[self setNextPreviousButtons];
[self setTextButton];
[self drawStories];
}
#pragma mark -
#pragma mark Side scroll view
@ -870,6 +887,9 @@
[buttonPrevious setEnabled:YES];
}
[buttonPrevious setBackgroundImage:[[ThemeManager themeManager] themedImage:[UIImage imageNamed:@"traverse_previous.png"]]
forState:UIControlStateNormal];
// setting up the NEXT UNREAD STORY BUTTON
buttonNext.enabled = YES;
NSInteger nextIndex = [appDelegate.storiesCollection indexOfNextUnreadStory];
@ -878,11 +898,11 @@
if ((nextIndex == -1 && unreadCount > 0 && !pageFinished) ||
nextIndex != -1) {
[buttonNext setTitle:[@"Next" uppercaseString] forState:UIControlStateNormal];
[buttonNext setBackgroundImage:[UIImage imageNamed:@"traverse_next.png"]
[buttonNext setBackgroundImage:[[ThemeManager themeManager] themedImage:[UIImage imageNamed:@"traverse_next.png"]]
forState:UIControlStateNormal];
} else {
[buttonNext setTitle:[@"Done" uppercaseString] forState:UIControlStateNormal];
[buttonNext setBackgroundImage:[UIImage imageNamed:@"traverse_done.png"]
[buttonNext setBackgroundImage:[[ThemeManager themeManager] themedImage:[UIImage imageNamed:@"traverse_done.png"]]
forState:UIControlStateNormal];
}
@ -910,14 +930,17 @@
[buttonSend setAlpha:.4];
}
[buttonSend setBackgroundImage:[[ThemeManager themeManager] themedImage:[UIImage imageNamed:@"traverse_send.png"]]
forState:UIControlStateNormal];
if (storyViewController.inTextView) {
[buttonText setTitle:[@"Story" uppercaseString] forState:UIControlStateNormal];
[buttonText setBackgroundImage:[UIImage imageNamed:@"traverse_text_on.png"]
[buttonText setBackgroundImage:[[ThemeManager themeManager] themedImage:[UIImage imageNamed:@"traverse_text_on.png"]]
forState:nil];
self.buttonText.titleEdgeInsets = UIEdgeInsetsMake(0, 26, 0, 0);
} else {
[buttonText setTitle:[@"Text" uppercaseString] forState:UIControlStateNormal];
[buttonText setBackgroundImage:[UIImage imageNamed:@"traverse_text.png"]
[buttonText setBackgroundImage:[[ThemeManager themeManager] themedImage:[UIImage imageNamed:@"traverse_text.png"]]
forState:nil];
self.buttonText.titleEdgeInsets = UIEdgeInsetsMake(0, 22, 0, 0);
}
@ -1074,6 +1097,12 @@
[self.previousPage changeLineSpacing:lineSpacing];
}
- (void)drawStories {
[self.currentPage drawStory];
[self.nextPage drawStory];
[self.previousPage drawStory];
}
#pragma mark -
#pragma mark HUDs

View file

@ -1,8 +1,8 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="8191" systemVersion="15A282b" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.XIB" version="3.0" toolsVersion="9060" systemVersion="15B42" targetRuntime="iOS.CocoaTouch" propertyAccessControl="none" useAutolayout="YES" useTraitCollections="YES">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="8154"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9051"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="StoryPageControl">
@ -13,8 +13,11 @@
<outlet property="buttonPrevious" destination="64" id="67"/>
<outlet property="buttonSend" destination="85" id="88"/>
<outlet property="buttonText" destination="81" id="84"/>
<outlet property="dragBarImageView" destination="kYw-ba-fFD" id="3C2-Je-cht"/>
<outlet property="loadingIndicator" destination="73" id="74"/>
<outlet property="prevNextBackgroundImageView" destination="71" id="S3e-tC-Pbu"/>
<outlet property="scrollView" destination="5" id="15"/>
<outlet property="textStorySendBackgroundImageView" destination="80" id="1hz-Zr-85e"/>
<outlet property="traverseView" destination="75" id="76"/>
<outlet property="view" destination="3" id="22"/>
</connections>

View file

@ -0,0 +1,49 @@
//
// ThemeManager.h
// NewsBlur
//
// Created by David Sinclair on 2015-12-06.
// Copyright © 2015 NewsBlur. All rights reserved.
//
#import <Foundation/Foundation.h>
#define UIColorFromFixedRGB(rgbValue) [[ThemeManager themeManager] fixedColorFromRGB:rgbValue]
#define UIColorFromLightDarkRGB(lightRGBValue, darkRGBValue) [[ThemeManager themeManager] colorFromLightRGB:lightRGBValue darkRGB:darkRGBValue]
#define UIColorFromRGB(rgbValue) [[ThemeManager themeManager] themedColorFromRGB:rgbValue]
#define NEWSBLUR_LINK_COLOR 0x405BA8
#define NEWSBLUR_HIGHLIGHT_COLOR 0xd2e6fd
#define NEWSBLUR_WHITE_COLOR 0xffffff
#define NEWSBLUR_BLACK_COLOR 0x0
extern NSString * const ThemeStyleLight;
extern NSString * const ThemeStyleSepia;
extern NSString * const ThemeStyleMedium;
extern NSString * const ThemeStyleDark;
@interface ThemeManager : NSObject
@property (nonatomic, strong) NSString *theme;
@property (nonatomic, readonly) NSString *themeDisplayName;
@property (nonatomic, readonly) NSString *themeCSSSuffix;
@property (nonatomic, readonly) BOOL isDarkTheme;
+ (instancetype)themeManager;
- (BOOL)isValidTheme:(NSString *)theme;
- (UIColor *)fixedColorFromRGB:(NSInteger)rgbValue;
- (UIColor *)colorFromLightRGB:(NSInteger)lightRGBValue darkRGB:(NSUInteger)darkRGBValue;
- (UIColor *)themedColorFromRGB:(NSInteger)rgbValue;
- (UIImage *)themedImage:(UIImage *)image;
- (void)prepareForWindow:(UIWindow *)window;
- (void)updateTheme;
- (void)updatePreferencesTheme;
- (BOOL)autoChangeTheme;
- (UIGestureRecognizer *)addThemeGestureRecognizerToView:(UIView *)view;
@end

View file

@ -0,0 +1,311 @@
//
// ThemeManager.m
// NewsBlur
//
// Created by David Sinclair on 2015-12-06.
// Copyright © 2015 NewsBlur. All rights reserved.
//
#import "ThemeManager.h"
#import "NewsBlurAppDelegate.h"
#import "NBContainerViewController.h"
#import "NewsBlurViewController.h"
#import "DashboardViewController.h"
#import "FeedDetailViewController.h"
#import "StoryDetailViewController.h"
#import "StoryPageControl.h"
#import <AudioToolbox/AudioToolbox.h>
NSString * const ThemeStyleLight = @"light";
NSString * const ThemeStyleSepia = @"sepia";
NSString * const ThemeStyleMedium = @"medium";
NSString * const ThemeStyleDark = @"dark";
@interface ThemeManager ()
@property (nonatomic, readonly) NewsBlurAppDelegate *appDelegate;
@end
@implementation ThemeManager
+ (instancetype)themeManager {
static id themeManager = nil;
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
themeManager = [self new];
});
return themeManager;
}
- (NSString *)theme {
NSString *theme = [[NSUserDefaults standardUserDefaults] objectForKey:@"theme_style"];
if (![self isValidTheme:theme]) {
theme = ThemeStyleLight;
self.theme = theme;
}
return theme;
}
- (void)setTheme:(NSString *)theme {
if ([self isValidTheme:theme]) {
[[NSUserDefaults standardUserDefaults] setObject:theme forKey:@"theme_style"];
[self updateTheme];
}
}
- (NSString *)themeName {
NSString *theme = self.theme;
if ([theme isEqualToString:ThemeStyleDark]) {
return @"Dark";
} else if ([theme isEqualToString:ThemeStyleSepia]) {
return @"Sepia";
} else if ([theme isEqualToString:ThemeStyleMedium]) {
return @"Medium";
} else {
return @"Light";
}
}
- (NSString *)themeCSSSuffix {
NSString *theme = self.theme;
if ([theme isEqualToString:ThemeStyleDark]) {
return @"Dark";
} else if ([theme isEqualToString:ThemeStyleSepia]) {
return @"Sepia";
} else if ([theme isEqualToString:ThemeStyleMedium]) {
return @"Medium";
} else {
return @"";
}
}
- (BOOL)isDarkTheme {
NSString *theme = self.theme;
return [theme isEqualToString:ThemeStyleDark] || [theme isEqualToString:ThemeStyleMedium];
}
- (BOOL)isValidTheme:(NSString *)theme {
return [theme isEqualToString:ThemeStyleLight] || [theme isEqualToString:ThemeStyleSepia] || [theme isEqualToString:ThemeStyleMedium] || [theme isEqualToString:ThemeStyleDark];
}
- (NewsBlurAppDelegate *)appDelegate {
return (NewsBlurAppDelegate *)[UIApplication sharedApplication].delegate;
}
- (UIColor *)fixedColorFromRGB:(NSInteger)rgbValue {
CGFloat red = ((rgbValue & 0xFF0000) >> 16) / 255.0;
CGFloat green = ((rgbValue & 0xFF00) >> 8) / 255.0;
CGFloat blue = ((rgbValue & 0xFF)) / 255.0;
return [UIColor colorWithRed:red green:green blue:blue alpha:1.0];
}
- (UIColor *)colorFromLightRGB:(NSInteger)lightRGBValue darkRGB:(NSUInteger)darkRGBValue {
NSInteger rgbValue = lightRGBValue;
if (self.isDarkTheme) {
rgbValue = darkRGBValue;
}
return [self fixedColorFromRGB:rgbValue];
}
- (UIColor *)themedColorFromRGB:(NSInteger)rgbValue {
NSString *theme = self.theme;
CGFloat red = ((rgbValue & 0xFF0000) >> 16) / 255.0;
CGFloat green = ((rgbValue & 0xFF00) >> 8) / 255.0;
CGFloat blue = ((rgbValue & 0xFF)) / 255.0;
// Debug method to log all of the unique colors; leave commented out
// [self debugColor:rgbValue];
if ([theme isEqualToString:ThemeStyleDark]) {
return [UIColor colorWithRed:1.0 - red green:1.0 - green blue:1.0 - blue alpha:1.0];
} else if ([theme isEqualToString:ThemeStyleMedium]) {
if (red < 0.5 && green < 0.5 && blue < 0.5) {
return [UIColor colorWithRed:1.0 - red green:1.0 - green blue:1.0 - blue alpha:1.0];
} else {
return [UIColor colorWithRed:red - 0.5 green:green - 0.5 blue:blue - 0.5 alpha:1.0];
}
} else if ([theme isEqualToString:ThemeStyleSepia]) {
CGFloat outputRed = (red * 0.393) + (green * 0.769) + (blue * 0.189);
CGFloat outputGreen = (red * 0.349) + (green * 0.686) + (blue * 0.168);
CGFloat outputBlue = (red * 0.272) + (green * 0.534) + (blue * 0.131);
return [UIColor colorWithRed:outputRed green:outputGreen blue:outputBlue alpha:1.0];
} else {
return [UIColor colorWithRed:red green:green blue:blue alpha:1.0];
}
}
- (UIImage *)themedImage:(UIImage *)image {
if ([self.theme isEqualToString:ThemeStyleDark]) {
CIImage *coreImage = [CIImage imageWithCGImage:image.CGImage];
CIFilter *filter = [CIFilter filterWithName:@"CIColorInvert"];
[filter setValue:coreImage forKey:kCIInputImageKey];
CIImage *result = [filter valueForKey:kCIOutputImageKey];
return [UIImage imageWithCIImage:result scale:image.scale orientation:image.imageOrientation];
} else {
return image;
}
}
- (void)debugColor:(NSInteger)rgbValue {
static NSMutableSet *colors = nil;
if (!colors) {
colors = [NSMutableSet set];
}
[colors addObject:[NSString stringWithFormat:@"0x%06lX", rgbValue]];
NSLog(@"all unique colors: %@", [[colors allObjects] sortedArrayUsingSelector:@selector(compare:)]); // log
}
- (void)prepareForWindow:(UIWindow *)window {
[self autoChangeTheme];
[self setupTheme];
[self addThemeGestureRecognizerToView:window];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(screenBrightnessChangedNotification:) name:UIScreenBrightnessDidChangeNotification object:nil];
}
- (void)setupTheme {
[UINavigationBar appearance].tintColor = UIColorFromRGB(0x0);
[UINavigationBar appearance].barTintColor = UIColorFromRGB(0xE3E6E0);
[UIToolbar appearance].barTintColor = UIColorFromRGB(0xE3E6E0);
[UISegmentedControl appearance].tintColor = UIColorFromRGB(0x8F918B);
UIBarStyle style = self.isDarkTheme ? UIBarStyleBlack : UIBarStyleDefault;
[UINavigationBar appearance].barStyle = style;
self.appDelegate.navigationController.navigationBar.barStyle = style;
}
- (void)updateTheme {
// Keep the dark & light themes in sync, so toggling uses the most recent themes for each
NSUserDefaults *prefs = [NSUserDefaults standardUserDefaults];
NSString *theme = self.theme;
NewsBlurAppDelegate *appDelegate = self.appDelegate;
if (self.isDarkTheme) {
[prefs setObject:theme forKey:@"theme_dark"];
} else {
[prefs setObject:theme forKey:@"theme_light"];
}
[self setupTheme];
[appDelegate.masterContainerViewController updateTheme];
[appDelegate.feedsViewController updateTheme];
[appDelegate.dashboardViewController updateTheme];
[appDelegate.feedDetailViewController updateTheme];
[appDelegate.storyPageControl updateTheme];
[self updatePreferencesTheme];
}
- (void)updatePreferencesTheme {
NewsBlurAppDelegate *appDelegate = self.appDelegate;
UIBarButtonItem *item = [appDelegate.preferencesViewController.navigationController.navigationBar.items.firstObject rightBarButtonItem];
item.tintColor = UIColorFromRGB(0x333333);
appDelegate.preferencesViewController.navigationController.navigationBar.titleTextAttributes = @{NSForegroundColorAttributeName : UIColorFromRGB(NEWSBLUR_BLACK_COLOR)};
appDelegate.preferencesViewController.navigationController.navigationBar.tintColor = UIColorFromRGB(NEWSBLUR_BLACK_COLOR);
appDelegate.preferencesViewController.navigationController.navigationBar.barTintColor = UIColorFromRGB(0xE3E6E0);
}
- (BOOL)autoChangeTheme {
NSUserDefaults *prefs = [NSUserDefaults standardUserDefaults];
if (![prefs boolForKey:@"theme_auto_toggle"]) {
return NO;
}
CGFloat screenBrightness = [UIScreen mainScreen].brightness;
CGFloat themeBrightness = [prefs floatForKey:@"theme_auto_brightness"];
BOOL wantDark = (screenBrightness < themeBrightness);
BOOL isDark = self.isDarkTheme;
if (wantDark != isDark) {
NSString *theme = nil;
if (wantDark) {
theme = [prefs objectForKey:@"theme_dark"];
} else {
theme = [prefs objectForKey:@"theme_light"];
}
NSLog(@"Automatically changing to theme: %@", [self themeDisplayName]); // log
self.theme = theme;
return YES;
}
return NO;
}
- (void)screenBrightnessChangedNotification:(NSNotification *)note {
if ([self autoChangeTheme]) {
[self updateTheme];
}
}
- (UIGestureRecognizer *)addThemeGestureRecognizerToView:(UIView *)view {
UIPanGestureRecognizer *recognizer = [[UIPanGestureRecognizer alloc] initWithTarget:self action:@selector(handleThemeGesture:)];
recognizer.minimumNumberOfTouches = 2;
recognizer.maximumNumberOfTouches = 2;
[view addGestureRecognizer:recognizer];
return recognizer;
}
- (void)handleThemeGesture:(UIPanGestureRecognizer *)recognizer {
NSUserDefaults *prefs = [NSUserDefaults standardUserDefaults];
if (recognizer.state != UIGestureRecognizerStateChanged || [prefs boolForKey:@"theme_auto_toggle"] || ![prefs boolForKey:@"theme_gesture"]) {
return;
}
CGPoint translation = [recognizer translationInView:recognizer.view];
if (fabs(translation.x) > 50.0 || fabs(translation.y) < 50.0) {
return;
}
BOOL isUpward = translation.y > 0.0;
NSString *isTheme = self.theme;
NSString *wantTheme = nil;
if (isUpward) {
wantTheme = [prefs objectForKey:@"theme_dark"];
} else {
wantTheme = [prefs objectForKey:@"theme_light"];
}
if (![isTheme isEqualToString:wantTheme]) {
self.theme = wantTheme;
NSLog(@"Swiped to theme: %@", [self themeDisplayName]); // log
[self updateTheme];
// Play a click sound, like a light switch; might want to use a custom sound instead?
AudioServicesPlaySystemSound(1105);
}
}
@end

View file

@ -11,15 +11,6 @@
#import "UIView+TKCategory.h"
static UIFont *indicatorFont = nil;
static UIColor *indicatorWhiteColor = nil;
static UIColor *indicatorBlackColor = nil;
static UIColor *positiveBackgroundColor = nil;
static UIColor *neutralBackgroundColor = nil;
static UIColor *positiveBackgroundShadowColor = nil;
static UIColor *neutralBackgroundShadowColor = nil;
static UIColor *negativeBackgroundColor = nil;
static UIColor *blueBackgroundColor = nil;
static UIColor *blueBackgroundShadowColor = nil;
@implementation UnreadCountView
@ -32,30 +23,6 @@ const int COUNT_HEIGHT = 15;
+ (void) initialize {
if (self == [UnreadCountView class]) {
indicatorFont = [UIFont boldSystemFontOfSize:12];
indicatorWhiteColor = [UIColor whiteColor];
indicatorBlackColor = [UIColor blackColor];
UIColor *ps = UIColorFromRGB(0x6EA74A);
UIColor *nt = UIColorFromRGB(0xB3B6AD);
UIColor *ng = UIColorFromRGB(0xCC2A2E);
UIColor *blue = UIColorFromRGB(0x11448B);
positiveBackgroundColor = ps;
neutralBackgroundColor = nt;
positiveBackgroundShadowColor = UIColorFromRGB(0x4E872A);
negativeBackgroundColor = ng;
neutralBackgroundShadowColor = UIColorFromRGB(0x93968D);
blueBackgroundColor = blue;
blueBackgroundShadowColor = UIColorFromRGB(0x01346B);
// UIColor *psGrad = UIColorFromRGB(0x559F4D);
// UIColor *ntGrad = UIColorFromRGB(0xE4AB00);
// UIColor *ngGrad = UIColorFromRGB(0x9B181B);
// const CGFloat* psTop = CGColorGetComponents(ps.CGColor);
// const CGFloat* psBot = CGColorGetComponents(psGrad.CGColor);
// CGFloat psGradient[] = {
// psTop[0], psTop[1], psTop[2], psTop[3],
// psBot[0], psBot[1], psBot[2], psBot[3]
// };
// psColors = psGradient;
}
}
@ -97,17 +64,17 @@ const int COUNT_HEIGHT = 15;
}
if (blueCount) {
[blueBackgroundShadowColor set];
[UIColorFromFixedRGB(0x01346B) set];
} else {
[positiveBackgroundShadowColor set];
[UIColorFromFixedRGB(0x4E872A) set];
}
CGRect rrShadow = CGRectMake(rr.origin.x, rr.origin.y+1, rr.size.width, rr.size.height);
[UIView drawRoundRectangleInRect:rrShadow withRadius:4];
if (blueCount) {
[blueBackgroundColor set];
[UIColorFromFixedRGB(0x11448B) set];
} else {
[positiveBackgroundColor set];
[UIColorFromFixedRGB(0x6EA74A) set];
}
[UIView drawRoundRectangleInRect:rr withRadius:4];
@ -119,9 +86,9 @@ const int COUNT_HEIGHT = 15;
UIColor *psColor;
if (blueCount) {
psColor = indicatorBlackColor;
psColor = UIColorFromFixedRGB(NEWSBLUR_BLACK_COLOR);
} else {
psColor = positiveBackgroundShadowColor;
psColor = UIColorFromFixedRGB(0x4E872A);
}
[psStr
drawAtPoint:CGPointMake(rr.origin.x + x_pos, rr.origin.y + y_pos + 1)
@ -131,7 +98,7 @@ const int COUNT_HEIGHT = 15;
[psStr
drawAtPoint:CGPointMake(rr.origin.x + x_pos, rr.origin.y + y_pos)
withAttributes:@{NSFontAttributeName: indicatorFont,
NSForegroundColorAttributeName: indicatorWhiteColor}];
NSForegroundColorAttributeName: UIColorFromFixedRGB(NEWSBLUR_WHITE_COLOR)}];
}
if (nt > 0 && appDelegate.selectedIntelligence <= 0) {
@ -149,11 +116,11 @@ const int COUNT_HEIGHT = 15;
}
[neutralBackgroundShadowColor set];
[UIColorFromFixedRGB(0x93968D) set];
CGRect rrShadow = CGRectMake(rr.origin.x, rr.origin.y+1, rr.size.width, rr.size.height);
[UIView drawRoundRectangleInRect:rrShadow withRadius:4];
[neutralBackgroundColor set];
[UIColorFromLightDarkRGB(0xB3B6AD, 0xaaaaaa) set];
[UIView drawRoundRectangleInRect:rr withRadius:4];
NSString *ntStr = [NSString stringWithFormat:@"%d", nt];
@ -164,12 +131,12 @@ const int COUNT_HEIGHT = 15;
[ntStr
drawAtPoint:CGPointMake(rr.origin.x + x_pos, rr.origin.y + y_pos + 1)
withAttributes:@{NSFontAttributeName: indicatorFont,
NSForegroundColorAttributeName: neutralBackgroundShadowColor}];
NSForegroundColorAttributeName:UIColorFromFixedRGB(0x93968D)}];
[ntStr
drawAtPoint:CGPointMake(rr.origin.x + x_pos, rr.origin.y + y_pos)
withAttributes:@{NSFontAttributeName: indicatorFont,
NSForegroundColorAttributeName: indicatorWhiteColor}];
NSForegroundColorAttributeName:UIColorFromRGB(NEWSBLUR_WHITE_COLOR)}];
}
}

View file

@ -47,8 +47,6 @@
// Do any additional setup after loading the view from its nib.
self.appDelegate = (NewsBlurAppDelegate *)[[UIApplication sharedApplication] delegate];
self.view.backgroundColor = UIColorFromRGB(0xd7dadf);
UITableView *profiles = [[UITableView alloc] initWithFrame:CGRectMake(0, 0, self.view.frame.size.width, self.view.frame.size.height) style:UITableViewStyleGrouped];
self.profileTable = profiles;
self.profileTable.dataSource = self;
@ -78,6 +76,9 @@
self.view.frame = vb;
self.profileTable.frame = vb;
self.profileBadge.frame = CGRectMake(0, 0, vb.size.width, 140);
self.view.backgroundColor = UIColorFromRGB(0xd7dadf);
self.profileTable.backgroundColor = UIColorFromRGB(0xd7dadf);
}
- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation {

View file

@ -41,7 +41,7 @@ const NSInteger kHeaderHeight = 24;
state:UIControlStateNormal];
[addTagBar setReturnKeyType:UIReturnKeyDone];
[addTagBar setBackgroundColor:UIColorFromRGB(0xDCDFD6)];
[addTagBar setTintColor:[UIColor whiteColor]];
[addTagBar setTintColor:UIColorFromRGB(NEWSBLUR_WHITE_COLOR)];
[addTagBar setSearchBarStyle:UISearchBarStyleMinimal];
[addTagBar setAutocapitalizationType:UITextAutocapitalizationTypeNone];
tagsTableView.tableHeaderView = addTagBar;

View file

@ -259,4 +259,4 @@ void drawLinearGradient(CGContextRef context, CGRect rect, CGColorRef startColor
}
*/
@end
@end

View file

@ -9,10 +9,32 @@
/* Begin PBXBuildFile section */
010EDEFA1B2386B7003B79DE /* OnePasswordExtension.m in Sources */ = {isa = PBXBuildFile; fileRef = 010EDEF81B2386B7003B79DE /* OnePasswordExtension.m */; };
010EDEFC1B238722003B79DE /* 1Password.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 010EDEFB1B238722003B79DE /* 1Password.xcassets */; };
1740C6881C10FD75005EA453 /* theme_color_dark.png in Resources */ = {isa = PBXBuildFile; fileRef = 1740C6841C10FD75005EA453 /* theme_color_dark.png */; };
1740C6891C10FD75005EA453 /* theme_color_light.png in Resources */ = {isa = PBXBuildFile; fileRef = 1740C6851C10FD75005EA453 /* theme_color_light.png */; };
1740C68A1C10FD75005EA453 /* theme_color_medium.png in Resources */ = {isa = PBXBuildFile; fileRef = 1740C6861C10FD75005EA453 /* theme_color_medium.png */; };
1740C68B1C10FD75005EA453 /* theme_color_sepia.png in Resources */ = {isa = PBXBuildFile; fileRef = 1740C6871C10FD75005EA453 /* theme_color_sepia.png */; };
1740C6901C110665005EA453 /* theme_color_dark@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 1740C68C1C110665005EA453 /* theme_color_dark@2x.png */; };
1740C6911C110665005EA453 /* theme_color_light@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 1740C68D1C110665005EA453 /* theme_color_light@2x.png */; };
1740C6921C110665005EA453 /* theme_color_medium@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 1740C68E1C110665005EA453 /* theme_color_medium@2x.png */; };
1740C6931C110665005EA453 /* theme_color_sepia@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 1740C68F1C110665005EA453 /* theme_color_sepia@2x.png */; };
1740C69C1C1110BA005EA453 /* theme_color_dark-sel.png in Resources */ = {isa = PBXBuildFile; fileRef = 1740C6941C1110BA005EA453 /* theme_color_dark-sel.png */; };
1740C69D1C1110BA005EA453 /* theme_color_dark-sel@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 1740C6951C1110BA005EA453 /* theme_color_dark-sel@2x.png */; };
1740C69E1C1110BA005EA453 /* theme_color_light-sel.png in Resources */ = {isa = PBXBuildFile; fileRef = 1740C6961C1110BA005EA453 /* theme_color_light-sel.png */; };
1740C69F1C1110BA005EA453 /* theme_color_light-sel@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 1740C6971C1110BA005EA453 /* theme_color_light-sel@2x.png */; };
1740C6A01C1110BA005EA453 /* theme_color_medium-sel.png in Resources */ = {isa = PBXBuildFile; fileRef = 1740C6981C1110BA005EA453 /* theme_color_medium-sel.png */; };
1740C6A11C1110BA005EA453 /* theme_color_medium-sel@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 1740C6991C1110BA005EA453 /* theme_color_medium-sel@2x.png */; };
1740C6A21C1110BA005EA453 /* theme_color_sepia-sel.png in Resources */ = {isa = PBXBuildFile; fileRef = 1740C69A1C1110BA005EA453 /* theme_color_sepia-sel.png */; };
1740C6A31C1110BA005EA453 /* theme_color_sepia-sel@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 1740C69B1C1110BA005EA453 /* theme_color_sepia-sel@2x.png */; };
17C074961C14C46B00CFCDB7 /* ThemeManager.m in Sources */ = {isa = PBXBuildFile; fileRef = 17C074951C14C46B00CFCDB7 /* ThemeManager.m */; };
17C4954B1C129863004805A7 /* UISearchBar+Field.m in Sources */ = {isa = PBXBuildFile; fileRef = 17C4954A1C129863004805A7 /* UISearchBar+Field.m */; };
17C4954F1C14049A004805A7 /* logo_newsblur_blur-dark.png in Resources */ = {isa = PBXBuildFile; fileRef = 17C4954E1C14049A004805A7 /* logo_newsblur_blur-dark.png */; };
17CBD3BC1BF66B07003FCCAE /* MarkReadMenuViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 17CBD3BB1BF66B07003FCCAE /* MarkReadMenuViewController.xib */; };
17CBD3BF1BF66B6C003FCCAE /* MarkReadMenuViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 17CBD3BE1BF66B6C003FCCAE /* MarkReadMenuViewController.m */; };
17CBD3C21BF6ED2C003FCCAE /* menu_icn_markread.png in Resources */ = {isa = PBXBuildFile; fileRef = 17CBD3C01BF6ED2C003FCCAE /* menu_icn_markread.png */; };
17CBD3C31BF6ED2C003FCCAE /* menu_icn_markread@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 17CBD3C11BF6ED2C003FCCAE /* menu_icn_markread@2x.png */; };
17E265DE1C0D17340060655F /* storyDetailViewDark.css in Resources */ = {isa = PBXBuildFile; fileRef = 17E265DD1C0D17340060655F /* storyDetailViewDark.css */; };
17E57D571C0E592600EB3D4B /* storyDetailViewMedium.css in Resources */ = {isa = PBXBuildFile; fileRef = 17E57D551C0E592600EB3D4B /* storyDetailViewMedium.css */; };
17E57D581C0E592600EB3D4B /* storyDetailViewSepia.css in Resources */ = {isa = PBXBuildFile; fileRef = 17E57D561C0E592600EB3D4B /* storyDetailViewSepia.css */; };
17EB505C1BE4411E0021358B /* choose_font.png in Resources */ = {isa = PBXBuildFile; fileRef = 17EB505A1BE4411E0021358B /* choose_font.png */; };
17EB505D1BE4411E0021358B /* choose_font@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 17EB505B1BE4411E0021358B /* choose_font@2x.png */; };
17EB50601BE46A900021358B /* FontListViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = 17EB505F1BE46A900021358B /* FontListViewController.m */; };
@ -476,11 +498,35 @@
010EDEF81B2386B7003B79DE /* OnePasswordExtension.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = OnePasswordExtension.m; path = "Other Sources/OnePasswordExtension/OnePasswordExtension.m"; sourceTree = "<group>"; };
010EDEF91B2386B7003B79DE /* OnePasswordExtension.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = OnePasswordExtension.h; path = "Other Sources/OnePasswordExtension/OnePasswordExtension.h"; sourceTree = "<group>"; };
010EDEFB1B238722003B79DE /* 1Password.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; name = 1Password.xcassets; path = "Other Sources/OnePasswordExtension/1Password.xcassets"; sourceTree = "<group>"; };
1740C6841C10FD75005EA453 /* theme_color_dark.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = theme_color_dark.png; sourceTree = "<group>"; };
1740C6851C10FD75005EA453 /* theme_color_light.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = theme_color_light.png; sourceTree = "<group>"; };
1740C6861C10FD75005EA453 /* theme_color_medium.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = theme_color_medium.png; sourceTree = "<group>"; };
1740C6871C10FD75005EA453 /* theme_color_sepia.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = theme_color_sepia.png; sourceTree = "<group>"; };
1740C68C1C110665005EA453 /* theme_color_dark@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "theme_color_dark@2x.png"; sourceTree = "<group>"; };
1740C68D1C110665005EA453 /* theme_color_light@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "theme_color_light@2x.png"; sourceTree = "<group>"; };
1740C68E1C110665005EA453 /* theme_color_medium@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "theme_color_medium@2x.png"; sourceTree = "<group>"; };
1740C68F1C110665005EA453 /* theme_color_sepia@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "theme_color_sepia@2x.png"; sourceTree = "<group>"; };
1740C6941C1110BA005EA453 /* theme_color_dark-sel.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "theme_color_dark-sel.png"; sourceTree = "<group>"; };
1740C6951C1110BA005EA453 /* theme_color_dark-sel@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "theme_color_dark-sel@2x.png"; sourceTree = "<group>"; };
1740C6961C1110BA005EA453 /* theme_color_light-sel.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "theme_color_light-sel.png"; sourceTree = "<group>"; };
1740C6971C1110BA005EA453 /* theme_color_light-sel@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "theme_color_light-sel@2x.png"; sourceTree = "<group>"; };
1740C6981C1110BA005EA453 /* theme_color_medium-sel.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "theme_color_medium-sel.png"; sourceTree = "<group>"; };
1740C6991C1110BA005EA453 /* theme_color_medium-sel@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "theme_color_medium-sel@2x.png"; sourceTree = "<group>"; };
1740C69A1C1110BA005EA453 /* theme_color_sepia-sel.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "theme_color_sepia-sel.png"; sourceTree = "<group>"; };
1740C69B1C1110BA005EA453 /* theme_color_sepia-sel@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "theme_color_sepia-sel@2x.png"; sourceTree = "<group>"; };
17C074941C14C46B00CFCDB7 /* ThemeManager.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ThemeManager.h; sourceTree = "<group>"; };
17C074951C14C46B00CFCDB7 /* ThemeManager.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ThemeManager.m; sourceTree = "<group>"; };
17C495491C129863004805A7 /* UISearchBar+Field.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = "UISearchBar+Field.h"; path = "Other Sources/UISearchBar+Field.h"; sourceTree = "<group>"; };
17C4954A1C129863004805A7 /* UISearchBar+Field.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = "UISearchBar+Field.m"; path = "Other Sources/UISearchBar+Field.m"; sourceTree = "<group>"; };
17C4954E1C14049A004805A7 /* logo_newsblur_blur-dark.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "logo_newsblur_blur-dark.png"; sourceTree = "<group>"; };
17CBD3BB1BF66B07003FCCAE /* MarkReadMenuViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MarkReadMenuViewController.xib; sourceTree = "<group>"; };
17CBD3BD1BF66B6C003FCCAE /* MarkReadMenuViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = MarkReadMenuViewController.h; sourceTree = "<group>"; };
17CBD3BE1BF66B6C003FCCAE /* MarkReadMenuViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = MarkReadMenuViewController.m; sourceTree = "<group>"; };
17CBD3C01BF6ED2C003FCCAE /* menu_icn_markread.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = menu_icn_markread.png; sourceTree = "<group>"; };
17CBD3C11BF6ED2C003FCCAE /* menu_icn_markread@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "menu_icn_markread@2x.png"; sourceTree = "<group>"; };
17E265DD1C0D17340060655F /* storyDetailViewDark.css */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.css; name = storyDetailViewDark.css; path = static/storyDetailViewDark.css; sourceTree = SOURCE_ROOT; };
17E57D551C0E592600EB3D4B /* storyDetailViewMedium.css */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.css; name = storyDetailViewMedium.css; path = static/storyDetailViewMedium.css; sourceTree = SOURCE_ROOT; };
17E57D561C0E592600EB3D4B /* storyDetailViewSepia.css */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.css; name = storyDetailViewSepia.css; path = static/storyDetailViewSepia.css; sourceTree = SOURCE_ROOT; };
17EB505A1BE4411E0021358B /* choose_font.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = choose_font.png; sourceTree = "<group>"; };
17EB505B1BE4411E0021358B /* choose_font@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "choose_font@2x.png"; sourceTree = "<group>"; };
17EB505E1BE46A900021358B /* FontListViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FontListViewController.h; sourceTree = "<group>"; };
@ -1283,6 +1329,8 @@
FFA0484319CA73B700618DC4 /* UIView+ViewController.m */,
FF4151BE16DED9660013E84B /* UIBarButtonItem+Image.h */,
FF4151BF16DED9660013E84B /* UIBarButtonItem+Image.m */,
17C495491C129863004805A7 /* UISearchBar+Field.h */,
17C4954A1C129863004805A7 /* UISearchBar+Field.m */,
FF1F13D618AAC97900FDA816 /* UIImage+Resize.h */,
FF1F13D718AAC97900FDA816 /* UIImage+Resize.m */,
FFA0483F19CA5F5B00618DC4 /* UIWebView+Offsets.h */,
@ -1562,6 +1610,22 @@
FFC5F30A16E2D2C2007AC72C /* story_share_twitter@2x.png */,
FF4151C516DEF1A80013E84B /* original_button.png */,
FF4151C616DEF1A80013E84B /* original_button@2x.png */,
1740C6851C10FD75005EA453 /* theme_color_light.png */,
1740C68D1C110665005EA453 /* theme_color_light@2x.png */,
1740C6961C1110BA005EA453 /* theme_color_light-sel.png */,
1740C6971C1110BA005EA453 /* theme_color_light-sel@2x.png */,
1740C6871C10FD75005EA453 /* theme_color_sepia.png */,
1740C68F1C110665005EA453 /* theme_color_sepia@2x.png */,
1740C69A1C1110BA005EA453 /* theme_color_sepia-sel.png */,
1740C69B1C1110BA005EA453 /* theme_color_sepia-sel@2x.png */,
1740C6861C10FD75005EA453 /* theme_color_medium.png */,
1740C68E1C110665005EA453 /* theme_color_medium@2x.png */,
1740C6991C1110BA005EA453 /* theme_color_medium-sel@2x.png */,
1740C6981C1110BA005EA453 /* theme_color_medium-sel.png */,
1740C6841C10FD75005EA453 /* theme_color_dark.png */,
1740C68C1C110665005EA453 /* theme_color_dark@2x.png */,
1740C6941C1110BA005EA453 /* theme_color_dark-sel.png */,
1740C6951C1110BA005EA453 /* theme_color_dark-sel@2x.png */,
FF4151C116DEDF9D0013E84B /* markread.png */,
FF4151C216DEDF9D0013E84B /* markread@2x.png */,
FF4151BA16DED7D10013E84B /* bar-separator.png */,
@ -1648,6 +1712,7 @@
FFEA5AEB19D340BC00ED87A0 /* logo_newsblur_512.png */,
43A4C42415B00A26008787B5 /* logo_background.png */,
43A4C42615B00A26008787B5 /* logo_newsblur_blur.png */,
17C4954E1C14049A004805A7 /* logo_newsblur_blur-dark.png */,
17F156701BDABBF60092EBFD /* safari_shadow@2x.png */,
43A4C43F15B00A26008787B5 /* warning.gif */,
43A4C44015B00A26008787B5 /* warning.png */,
@ -1660,6 +1725,9 @@
isa = PBXGroup;
children = (
FF67D3BD168A708D0057A7DA /* storyDetailView.css */,
17E265DD1C0D17340060655F /* storyDetailViewDark.css */,
17E57D551C0E592600EB3D4B /* storyDetailViewMedium.css */,
17E57D561C0E592600EB3D4B /* storyDetailViewSepia.css */,
FF67D3BA168A70630057A7DA /* trainer.css */,
);
name = css;
@ -1857,6 +1925,8 @@
1D3623250D0F684500981E51 /* NewsBlurAppDelegate.m */,
FFD1D72F1459B63500E46F89 /* BaseViewController.h */,
FFD1D7301459B63500E46F89 /* BaseViewController.m */,
17C074941C14C46B00CFCDB7 /* ThemeManager.h */,
17C074951C14C46B00CFCDB7 /* ThemeManager.m */,
FFE5322D144C8AC300ACFDE0 /* Utilities.h */,
FFE5322E144C8AC300ACFDE0 /* Utilities.m */,
43D818A115B940C200733444 /* DataUtilities.h */,
@ -2268,6 +2338,8 @@
FF3A3E0F1BFBBB6400ADC01A /* GothamNarrow-Medium.otf in Resources */,
FF265F12187B6D4F0080C332 /* fitvid.js in Resources */,
FF67D3CC168A73380057A7DA /* storyDetailView.js in Resources */,
1740C6A31C1110BA005EA453 /* theme_color_sepia-sel@2x.png in Resources */,
1740C6921C110665005EA453 /* theme_color_medium@2x.png in Resources */,
FF67D3CD168A73380057A7DA /* zepto.js in Resources */,
FF67D3CE168A73380057A7DA /* trainer.js in Resources */,
FF67D3CF168A73380057A7DA /* fastTouch.js in Resources */,
@ -2302,6 +2374,7 @@
010EDEFC1B238722003B79DE /* 1Password.xcassets in Resources */,
FF6DD31F1AEDF9F300F1F53A /* menu_icn_rename@2x.png in Resources */,
437AA8CB159394E2005463F5 /* ShareViewController~ipad.xib in Resources */,
17E57D581C0E592600EB3D4B /* storyDetailViewSepia.css in Resources */,
FF88F10D1811BAEC007FEE78 /* unread_green@2x.png in Resources */,
43081E2215AFE84200B24D7A /* ShareViewController.xib in Resources */,
43A4C44E15B00A26008787B5 /* arrow.png in Resources */,
@ -2314,13 +2387,16 @@
43A4C47E15B00A26008787B5 /* logo_512.png in Resources */,
43A4C47F15B00A26008787B5 /* logo_background.png in Resources */,
FFB9BE4717F4B65B00FE0A36 /* logo_120.png in Resources */,
1740C6911C110665005EA453 /* theme_color_light@2x.png in Resources */,
43A4C48115B00A26008787B5 /* logo_newsblur_blur.png in Resources */,
43A4C49A15B00A26008787B5 /* warning.gif in Resources */,
43A4C49B15B00A26008787B5 /* warning.png in Resources */,
17E265DE1C0D17340060655F /* storyDetailViewDark.css in Resources */,
43A4C49C15B00A26008787B5 /* world.png in Resources */,
43C1680B15B3D99B00428BA3 /* 7-location-place.png in Resources */,
43B6A27515B6952F00CEA2E6 /* group.png in Resources */,
43B6A27615B6952F00CEA2E6 /* group@2x.png in Resources */,
1740C6901C110665005EA453 /* theme_color_dark@2x.png in Resources */,
43E8381F15BC73EB000553BE /* FirstTimeUserAddFriendsViewController.xib in Resources */,
43E8382115BC73EB000553BE /* FirstTimeUserAddNewsBlurViewController.xib in Resources */,
43E8382315BC73EB000553BE /* FirstTimeUserAddSitesViewController.xib in Resources */,
@ -2343,6 +2419,7 @@
43A4BAE315C866FA00F3B8D4 /* popoverArrowRightSimple.png in Resources */,
FFC486AF19CA413C00F4758F /* logo_180.png in Resources */,
43A4BAE415C866FA00F3B8D4 /* popoverArrowUp.png in Resources */,
1740C68A1C10FD75005EA453 /* theme_color_medium.png in Resources */,
43A4BAE515C866FA00F3B8D4 /* popoverArrowUp@2x.png in Resources */,
43A4BAE615C866FA00F3B8D4 /* popoverArrowUpSimple.png in Resources */,
43A4BAE715C866FA00F3B8D4 /* popoverBg.png in Resources */,
@ -2360,6 +2437,7 @@
43C3D40515D44EA30066D36D /* user_light@2x.png in Resources */,
43C3D40A15D468BA0066D36D /* all.png in Resources */,
43C3D40C15D469010066D36D /* unread_yellow.png in Resources */,
1740C6891C10FD75005EA453 /* theme_color_light.png in Resources */,
43C3D41215D46D330066D36D /* all@2x.png in Resources */,
43B232C115D5F61700D035B4 /* AuthorizeServicesViewController.xib in Resources */,
430C4BC015D7208600B9F63B /* facebook.png in Resources */,
@ -2383,6 +2461,7 @@
FF03B00219F881380063002A /* ARChromeActivity@3x~ipad.png in Resources */,
FF5F3A82162B82B5008DBE3E /* rainbow.png in Resources */,
FF5F3A85162B831A008DBE3E /* user_orange.png in Resources */,
1740C69F1C1110BA005EA453 /* theme_color_light-sel@2x.png in Resources */,
FF5F3A87162B834E008DBE3E /* bin_closed.png in Resources */,
FF5F3A89162B8377008DBE3E /* arrow_branch.png in Resources */,
FF5F3A8B162B8390008DBE3E /* car.png in Resources */,
@ -2413,6 +2492,7 @@
17F156711BDABBF60092EBFD /* safari_shadow@2x.png in Resources */,
FF29708E16DD7C8A00E92F85 /* segment_left_selected.png in Resources */,
FF29709016DD7FD800E92F85 /* segment_unselected.png in Resources */,
17E57D571C0E592600EB3D4B /* storyDetailViewMedium.css in Resources */,
FF03B00319F881380063002A /* ARChromeActivity~ipad.png in Resources */,
FF29709216DD80F700E92F85 /* segment_right_selected.png in Resources */,
FF29709416DD8CB000E92F85 /* unread_yellow@2x.png in Resources */,
@ -2423,6 +2503,7 @@
FF4151BC16DED7D10013E84B /* bar-separator.png in Resources */,
FF4151BD16DED7D10013E84B /* bar-separator@2x.png in Resources */,
FF4151C316DEDF9D0013E84B /* markread.png in Resources */,
1740C6931C110665005EA453 /* theme_color_sepia@2x.png in Resources */,
FF4151C416DEDF9D0013E84B /* markread@2x.png in Resources */,
FF4151C716DEF1A80013E84B /* original_button.png in Resources */,
17EB505C1BE4411E0021358B /* choose_font.png in Resources */,
@ -2432,6 +2513,7 @@
FFC5F30C16E2D2C2007AC72C /* story_share_appnet_active@2x.png in Resources */,
FFC5F30D16E2D2C2007AC72C /* story_share_appnet.png in Resources */,
FFC5F30E16E2D2C2007AC72C /* story_share_appnet@2x.png in Resources */,
1740C6A11C1110BA005EA453 /* theme_color_medium-sel@2x.png in Resources */,
FFC5F30F16E2D2C2007AC72C /* story_share_facebook_active.png in Resources */,
FFC486B219CA416D00F4758F /* logo_57.png in Resources */,
FFC5F31016E2D2C2007AC72C /* story_share_facebook_active@2x.png in Resources */,
@ -2477,6 +2559,7 @@
FF9F171618DCF3E000B75FC7 /* ios7_back_button@2x.png in Resources */,
FF688E5216E6B8D0003B7B42 /* traverse_background.png in Resources */,
FF688E5316E6B8D0003B7B42 /* traverse_background@2x.png in Resources */,
1740C68B1C10FD75005EA453 /* theme_color_sepia.png in Resources */,
FFDD845C16E8871A000AA0A2 /* menu_icn_delete.png in Resources */,
FFDD845D16E8871A000AA0A2 /* menu_icn_delete@2x.png in Resources */,
FF03AFE419F87A770063002A /* g_icn_folder_read.png in Resources */,
@ -2485,6 +2568,7 @@
FFDD846016E8871A000AA0A2 /* menu_icn_fetch.png in Resources */,
FFDD846116E8871A000AA0A2 /* menu_icn_fetch@2x.png in Resources */,
FF03AFFE19F881380063002A /* ARChromeActivity.png in Resources */,
17C4954F1C14049A004805A7 /* logo_newsblur_blur-dark.png in Resources */,
FFDD846216E8871A000AA0A2 /* menu_icn_followers.png in Resources */,
FFDD846316E8871A000AA0A2 /* menu_icn_followers@2x.png in Resources */,
FFDD846416E8871A000AA0A2 /* menu_icn_move.png in Resources */,
@ -2505,13 +2589,16 @@
FF03B00119F881380063002A /* ARChromeActivity@3x.png in Resources */,
FFDD847E16E887D3000AA0A2 /* g_icn_folder.png in Resources */,
FFDD847F16E887D3000AA0A2 /* g_icn_folder@2x.png in Resources */,
1740C6881C10FD75005EA453 /* theme_color_dark.png in Resources */,
FFDD848016E887D3000AA0A2 /* g_icn_hidden.png in Resources */,
FFDD848116E887D3000AA0A2 /* g_icn_hidden@2x.png in Resources */,
FFB7050C1925921F0052101C /* line_spacing_s.png in Resources */,
1740C69E1C1110BA005EA453 /* theme_color_light-sel.png in Resources */,
FFDD848216E887D3000AA0A2 /* g_icn_unread.png in Resources */,
FFDD848316E887D3000AA0A2 /* g_icn_unread@2x.png in Resources */,
FFDD848616E8EB1E000AA0A2 /* share.png in Resources */,
FFDD848716E8EB1E000AA0A2 /* share@2x.png in Resources */,
1740C6A01C1110BA005EA453 /* theme_color_medium-sel.png in Resources */,
FFDD848A16E8EBF8000AA0A2 /* train.png in Resources */,
FFDD848B16E8EBF8000AA0A2 /* train@2x.png in Resources */,
FFB9BE4A17F4B65B00FE0A36 /* logo_40.png in Resources */,
@ -2526,12 +2613,15 @@
FFB9BE4917F4B65B00FE0A36 /* logo_29.png in Resources */,
17CBD3C31BF6ED2C003FCCAE /* menu_icn_markread@2x.png in Resources */,
FF8364BB1755759A008F5C58 /* traverse_text.png in Resources */,
1740C69D1C1110BA005EA453 /* theme_color_dark-sel@2x.png in Resources */,
FF8364BC1755759A008F5C58 /* traverse_text@2x.png in Resources */,
FF8364BF1756949E008F5C58 /* traverse_text_on.png in Resources */,
1740C6A21C1110BA005EA453 /* theme_color_sepia-sel.png in Resources */,
FFEA5AEA19D3407400ED87A0 /* launch_gradient.png in Resources */,
FF03AFEF19F87F2E0063002A /* safari@2x.png in Resources */,
FF8364C01756949E008F5C58 /* traverse_text_on@2x.png in Resources */,
FF8364C61757EC0B008F5C58 /* traverse_background_left.png in Resources */,
1740C69C1C1110BA005EA453 /* theme_color_dark-sel.png in Resources */,
FF8364C71757EC0B008F5C58 /* traverse_background_left@2x.png in Resources */,
FFC518B91768E59F00542719 /* g_icn_offline.png in Resources */,
FF1104611769695A00502C29 /* g_icn_offline@2x.png in Resources */,
@ -2591,6 +2681,7 @@
78095E39128EF30D00230C8E /* ASINetworkQueue.m in Sources */,
78095EC9128F30B500230C8E /* OriginalStoryViewController.m in Sources */,
FF1C4E171A3FB1F4000995E3 /* NBActivityItemProvider.m in Sources */,
17C4954B1C129863004805A7 /* UISearchBar+Field.m in Sources */,
FF793E1B13F1A9F700F282D2 /* ASIDataCompressor.m in Sources */,
FF3A3E171BFC3F1300ADC01A /* NSNull+JSON.m in Sources */,
FF793E1C13F1A9F700F282D2 /* ASIDataDecompressor.m in Sources */,
@ -2681,6 +2772,7 @@
FFA045B619CA49D700618DC4 /* SSWDirectionalPanGestureRecognizer.m in Sources */,
FF1F13D318A9C2BE00FDA816 /* TMCache.m in Sources */,
FF22FE5E16E53ADC0046165A /* Underscore+Functional.m in Sources */,
17C074961C14C46B00CFCDB7 /* ThemeManager.m in Sources */,
FF22FE5F16E53ADC0046165A /* Underscore.m in Sources */,
FF22FE6016E53ADC0046165A /* USArrayWrapper.m in Sources */,
FF22FE6116E53ADC0046165A /* USDictionaryWrapper.m in Sources */,

View file

@ -2,6 +2,8 @@
#import <Foundation/Foundation.h>
#import <UIKit/UIKit.h>
#import "Underscore.h"
#import "Utilities.h"
#import "ThemeManager.h"
#import <SystemConfiguration/SystemConfiguration.h>
#import <MobileCoreServices/MobileCoreServices.h>
@ -26,19 +28,11 @@
#endif
#define _ Underscore
#define UIColorFromRGB(rgbValue) [UIColor \
colorWithRed:((float)((rgbValue & 0xFF0000) >> 16))/255.0 \
green:((float)((rgbValue & 0xFF00) >> 8))/255.0 \
blue:((float)(rgbValue & 0xFF))/255.0 alpha:1.0]
#define NEWSBLUR_LINK_COLOR 0x405BA8
#define NEWSBLUR_HIGHLIGHT_COLOR 0xd2e6fd
#define SYSTEM_VERSION_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedSame)
#define SYSTEM_VERSION_GREATER_THAN(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedDescending)
#define SYSTEM_VERSION_GREATER_THAN_OR_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] != NSOrderedAscending)
#define SYSTEM_VERSION_LESS_THAN(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] == NSOrderedAscending)
#define SYSTEM_VERSION_LESS_THAN_OR_EQUAL_TO(v) ([[[UIDevice currentDevice] systemVersion] compare:v options:NSNumericSearch] != NSOrderedDescending)
#endif
#endif

View file

@ -28,6 +28,8 @@
- (void)settingsViewControllerDidEnd:(IASKAppSettingsViewController*)sender;
@optional
- (void)settingsViewControllerWillAppear:(IASKAppSettingsViewController*)sender;
#pragma mark - UITableView header customization
- (CGFloat) settingsViewController:(id<IASKViewController>)settingsViewController
tableView:(UITableView *)tableView

View file

@ -209,6 +209,11 @@ CGRect IASKCGRectSwap(CGRect rect);
[dc addObserver:self selector:@selector(didChangeSettingViaIASK:) name:kIASKAppSettingChanged object:nil];
[self userDefaultsDidChange]; // force update in case of changes while we were hidden
}
if (self.delegate && [self.delegate conformsToProtocol:@protocol(IASKSettingsDelegate)]) {
[self.delegate settingsViewControllerWillAppear:self];
}
[super viewWillAppear:animated];
}

View file

@ -0,0 +1,15 @@
//
// UISearchBar+Field.h
// NewsBlur
//
// Created by David Sinclair on 2015-12-04.
// Copyright © 2015 NewsBlur. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface UISearchBar (Field)
@property (nonatomic, readonly) UITextField *nb_searchField;
@end

View file

@ -0,0 +1,35 @@
//
// UISearchBar+Field.m
// NewsBlur
//
// Created by David Sinclair on 2015-12-04.
// Copyright © 2015 NewsBlur. All rights reserved.
//
#import "UISearchBar+Field.h"
@implementation UISearchBar (Field)
- (UITextField *)nb_searchField {
return [self nb_searchFieldForView:self];
}
- (UITextField *)nb_searchFieldForView:(UIView *)view {
if ([view isKindOfClass:[UITextField class]])
{
return (UITextField *)view;
}
for (UIView *subview in view.subviews)
{
UITextField *field = [self nb_searchFieldForView:subview];
if (field) {
return field;
}
}
return nil;
}
@end

View file

@ -1,14 +1,15 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<document type="com.apple.InterfaceBuilder3.CocoaTouch.iPad.XIB" version="3.0" toolsVersion="8191" systemVersion="15A282b" targetRuntime="iOS.CocoaTouch.iPad" propertyAccessControl="none">
<document type="com.apple.InterfaceBuilder3.CocoaTouch.iPad.XIB" version="3.0" toolsVersion="9060" systemVersion="15C40a" targetRuntime="iOS.CocoaTouch.iPad" propertyAccessControl="none">
<dependencies>
<deployment identifier="iOS"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="8154"/>
<plugIn identifier="com.apple.InterfaceBuilder.IBCocoaTouchPlugin" version="9051"/>
</dependencies>
<objects>
<placeholder placeholderIdentifier="IBFilesOwner" id="-1" userLabel="File's Owner" customClass="DashboardViewController">
<connections>
<outlet property="activitiesModule" destination="38" id="39"/>
<outlet property="interactionsModule" destination="kFc-yL-pjO" id="a47-wf-eGi"/>
<outlet property="logoImageView" destination="zOJ-C7-I3n" id="2QA-mL-Y5t"/>
<outlet property="segmentedButton" destination="24" id="44"/>
<outlet property="toolbar" destination="22" id="55"/>
<outlet property="topToolbar" destination="4z7-nH-jyd" id="mgJ-kU-Ppl"/>

View file

@ -70,30 +70,30 @@
<key>Key</key>
<string>default_feed_read_filter</string>
</dict>
<dict>
<key>FooterText</key>
<string>The mark read options are always available via a long press on the mark read button in the stories list.</string>
<key>Type</key>
<string>PSMultiValueSpecifier</string>
<key>Title</key>
<string>Confirm mark read</string>
<key>Titles</key>
<array>
<string>On folders and sites</string>
<string>On folders only</string>
<string>Never</string>
</array>
<key>DefaultValue</key>
<string>folders</string>
<key>Values</key>
<array>
<string>all</string>
<string>folders</string>
<string>never</string>
</array>
<key>Key</key>
<string>default_confirm_read_filter</string>
</dict>
<dict>
<key>FooterText</key>
<string>The mark read options are always available via a long press on the mark read button in the stories list.</string>
<key>Type</key>
<string>PSMultiValueSpecifier</string>
<key>Title</key>
<string>Confirm mark read</string>
<key>Titles</key>
<array>
<string>On folders and sites</string>
<string>On folders only</string>
<string>Never</string>
</array>
<key>DefaultValue</key>
<string>folders</string>
<key>Values</key>
<array>
<string>all</string>
<string>folders</string>
<string>never</string>
</array>
<key>Key</key>
<string>default_confirm_read_filter</string>
</dict>
<dict>
<key>Type</key>
<string>PSMultiValueSpecifier</string>
@ -102,7 +102,7 @@
<key>Titles</key>
<array>
<string>Mark read when scrolling past</string>
<string>Don't automatically mark read</string>
<string>Don&apos;t automatically mark read</string>
</array>
<key>DefaultValue</key>
<string>nothing</string>
@ -202,6 +202,112 @@
<key>Key</key>
<string>story_font_size</string>
</dict>
<dict>
<key>Title</key>
<string>Theme</string>
<key>Type</key>
<string>PSGroupSpecifier</string>
</dict>
<dict>
<key>Type</key>
<string>PSToggleSwitchSpecifier</string>
<key>Title</key>
<string>Switch automatically</string>
<key>Key</key>
<string>theme_auto_toggle</string>
<key>DefaultValue</key>
<false/>
</dict>
<dict>
<key>Type</key>
<string>PSSliderSpecifier</string>
<key>Key</key>
<string>theme_auto_brightness</string>
<key>DefaultValue</key>
<real>0.5</real>
<key>MinimumValue</key>
<integer>0</integer>
<key>MaximumValue</key>
<integer>1</integer>
<key>MinimumValueImage</key>
<string>theme_dark.png</string>
<key>MaximumValueImage</key>
<string>theme_light.png</string>
</dict>
<dict>
<key>Type</key>
<string>PSMultiValueSpecifier</string>
<key>Title</key>
<string>Current theme</string>
<key>Titles</key>
<array>
<string>Light</string>
<string>Sepia</string>
<string>Medium</string>
<string>Dark</string>
</array>
<key>DefaultValue</key>
<string>light</string>
<key>Values</key>
<array>
<string>light</string>
<string>sepia</string>
<string>medium</string>
<string>dark</string>
</array>
<key>Key</key>
<string>theme_style</string>
</dict>
<dict>
<key>Type</key>
<string>PSToggleSwitchSpecifier</string>
<key>Title</key>
<string>Switch via two-finger swipe</string>
<key>Key</key>
<string>theme_gesture</string>
<key>DefaultValue</key>
<true/>
</dict>
<dict>
<key>Type</key>
<string>PSMultiValueSpecifier</string>
<key>Title</key>
<string>Dark theme</string>
<key>Titles</key>
<array>
<string>Medium</string>
<string>Dark</string>
</array>
<key>DefaultValue</key>
<string>dark</string>
<key>Values</key>
<array>
<string>medium</string>
<string>dark</string>
</array>
<key>Key</key>
<string>theme_dark</string>
</dict>
<dict>
<key>Type</key>
<string>PSMultiValueSpecifier</string>
<key>Title</key>
<string>Light theme</string>
<key>Titles</key>
<array>
<string>Light</string>
<string>Sepia</string>
</array>
<key>DefaultValue</key>
<string>light</string>
<key>Values</key>
<array>
<string>light</string>
<string>sepia</string>
</array>
<key>Key</key>
<string>theme_light</string>
</dict>
<dict>
<key>Title</key>
<string>Offline stories</string>

View file

@ -70,50 +70,50 @@
<key>Key</key>
<string>default_feed_read_filter</string>
</dict>
<dict>
<key>FooterText</key>
<string>The mark read options are always available via a long press on the mark read button in the stories list.</string>
<key>Type</key>
<string>PSMultiValueSpecifier</string>
<key>Title</key>
<string>Confirm mark read</string>
<key>Titles</key>
<array>
<string>On folders and sites</string>
<string>On folders only</string>
<string>Never</string>
</array>
<key>DefaultValue</key>
<string>folders</string>
<key>Values</key>
<array>
<string>all</string>
<string>folders</string>
<string>never</string>
</array>
<key>Key</key>
<string>default_confirm_read_filter</string>
</dict>
<dict>
<key>Type</key>
<string>PSMultiValueSpecifier</string>
<key>Title</key>
<string>Mark stories read on scroll</string>
<key>Titles</key>
<array>
<string>Mark read when scrolling past</string>
<string>Don't automatically mark read</string>
</array>
<key>DefaultValue</key>
<string>nothing</string>
<key>Values</key>
<array>
<string>mark_on_scroll</string>
<string>nothing</string>
</array>
<key>Key</key>
<string>default_scroll_read_filter</string>
</dict>
<dict>
<key>FooterText</key>
<string>The mark read options are always available via a long press on the mark read button in the stories list.</string>
<key>Type</key>
<string>PSMultiValueSpecifier</string>
<key>Title</key>
<string>Confirm mark read</string>
<key>Titles</key>
<array>
<string>On folders and sites</string>
<string>On folders only</string>
<string>Never</string>
</array>
<key>DefaultValue</key>
<string>folders</string>
<key>Values</key>
<array>
<string>all</string>
<string>folders</string>
<string>never</string>
</array>
<key>Key</key>
<string>default_confirm_read_filter</string>
</dict>
<dict>
<key>Type</key>
<string>PSMultiValueSpecifier</string>
<key>Title</key>
<string>Mark stories read on scroll</string>
<key>Titles</key>
<array>
<string>Mark read when scrolling past</string>
<string>Don&apos;t automatically mark read</string>
</array>
<key>DefaultValue</key>
<string>nothing</string>
<key>Values</key>
<array>
<string>mark_on_scroll</string>
<string>nothing</string>
</array>
<key>Key</key>
<string>default_scroll_read_filter</string>
</dict>
<dict>
<key>Type</key>
<string>PSMultiValueSpecifier</string>
@ -222,6 +222,112 @@
<key>Key</key>
<string>story_font_size</string>
</dict>
<dict>
<key>Title</key>
<string>Theme</string>
<key>Type</key>
<string>PSGroupSpecifier</string>
</dict>
<dict>
<key>Type</key>
<string>PSToggleSwitchSpecifier</string>
<key>Title</key>
<string>Switch automatically</string>
<key>Key</key>
<string>theme_auto_toggle</string>
<key>DefaultValue</key>
<false/>
</dict>
<dict>
<key>Type</key>
<string>PSSliderSpecifier</string>
<key>Key</key>
<string>theme_auto_brightness</string>
<key>DefaultValue</key>
<real>0.5</real>
<key>MinimumValue</key>
<integer>0</integer>
<key>MaximumValue</key>
<integer>1</integer>
<key>MinimumValueImage</key>
<string>theme_dark.png</string>
<key>MaximumValueImage</key>
<string>theme_light.png</string>
</dict>
<dict>
<key>Type</key>
<string>PSMultiValueSpecifier</string>
<key>Title</key>
<string>Current theme</string>
<key>Titles</key>
<array>
<string>Light</string>
<string>Sepia</string>
<string>Medium</string>
<string>Dark</string>
</array>
<key>DefaultValue</key>
<string>light</string>
<key>Values</key>
<array>
<string>light</string>
<string>sepia</string>
<string>medium</string>
<string>dark</string>
</array>
<key>Key</key>
<string>theme_style</string>
</dict>
<dict>
<key>Type</key>
<string>PSToggleSwitchSpecifier</string>
<key>Title</key>
<string>Switch via two-finger swipe up or down</string>
<key>Key</key>
<string>theme_gesture</string>
<key>DefaultValue</key>
<true/>
</dict>
<dict>
<key>Type</key>
<string>PSMultiValueSpecifier</string>
<key>Title</key>
<string>Dark theme</string>
<key>Titles</key>
<array>
<string>Medium</string>
<string>Dark</string>
</array>
<key>DefaultValue</key>
<string>dark</string>
<key>Values</key>
<array>
<string>medium</string>
<string>dark</string>
</array>
<key>Key</key>
<string>theme_dark</string>
</dict>
<dict>
<key>Type</key>
<string>PSMultiValueSpecifier</string>
<key>Title</key>
<string>Light theme</string>
<key>Titles</key>
<array>
<string>Light</string>
<string>Sepia</string>
</array>
<key>DefaultValue</key>
<string>light</string>
<key>Values</key>
<array>
<string>light</string>
<string>sepia</string>
</array>
<key>Key</key>
<string>theme_light</string>
</dict>
<dict>
<key>Title</key>
<string>Offline stories</string>

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.7 KiB

View file

@ -0,0 +1,242 @@
/**
* Dark Theme overrides
*/
/**
* Universal Style
*/
body {
color: #aaaaaa;
background-color: black;
}
/* ========== */
/* = Header = */
/* ========== */
.NB-story-title {
color: #313330;
}
.NB-story-title-positive {
color: #58A353;
text-shadow: 0 1px 0 #E9F6E9;
}
.NB-story-title-negative {
color: #B85044;
text-shadow: 0 1px 0 #F6E9E9;
}
.NB-story-permalink {
color: lightgray;
}
.NB-story-date {
color: #818776;
}
.NB-middot {
color: #A0A0A0;
}
.NB-story-author {
color: #959B8B;
text-shadow: 0 1px 0 rgba(255, 255, 255, .5);
}
.NB-story-author-positive {
color: #58A353;
text-shadow: 0 1px 0 #E9F6E9;
}
.NB-story-author-negative {
color: #B85044;
text-shadow: 0 1px 0 #F6E9E9;
}
.NB-story-tag {
background-color: rgba(0, 0, 0, .1);
color: #959B8B;
text-shadow: 0 1px 0 rgba(255, 255, 255, .5);
border-color: rgba(255, 255, 255, .3) transparent rgba(0, 0, 0, .1);
}
.NB-story-tag-positive {
background-color: #88B383;
color: white;
text-shadow: 0 1px 0 #588353;
}
.NB-story-tag-negative {
background-color: #C89094;
color: white;
text-shadow: 0 1px 0 #986064;
}
.NB-story-tag .NB-highlight,
.NB-user-tag .NB-highlight,
.NB-story-author .NB-highlight,
.NB-show-profile .NB-highlight {
background-color: #000;
}
.NB-user-tag {
color: #959B8B;
text-shadow: 0 1px 0 rgba(255, 255, 255, .5);
border-color: rgba(255, 255, 255, .3) transparent rgba(0, 0, 0, .1);
}
.NB-user-tag.NB-add-user-tag {
background: rgba(0, 0, 0, .25) url("add_tag.png") no-repeat 6px 3px;
color: #E5EBDB;
text-shadow: 0 1px 0 rgba(0, 0, 0, .1);
}
.NB-story-starred-date {
color: #818776;
}
a {
color: lightblue;
}
a:active {
color: #82301A;
}
.NB-story blockquote {
color: rgba(10, 12, 38, .8);
}
.NB-header {
color: #bbbbbb;
background-image: -webkit-gradient(linear, left top, left bottom, from(#111111), to(#444444));
border-bottom: 1px solid #C2C5BE;
text-shadow: 0 1px 0 rgba(255, 255, 255, .5);
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}
/* Comments */
.NB-story-comments-group:last-child {
border-bottom: 1px solid #EAECE8;
}
#story_pane .NB-story-comments-shares-teaser.NB-highlighted {
color: #aaaaaa;
background-color: #111111;
}
#story_pane .NB-story-comment-reply.NB-highlighted {
color: #aaaaaa;
background-color: #111111;
}
#story_pane .NB-story-comment.NB-highlighted {
color: #aaaaaa;
background-color: #111111;
}
.NB-story-comment:last-child {
border-bottom: 1px solid #A6A6A6;
}
/* Edit, Like, and Reply buttons */
.NB-button {
text-shadow: 0px 1px 0px rgba(255,255,255,1);
}
.NB-button a {
color: rgba(255, 255, 255, .8);
text-shadow: 0px 1px 0px rgba(0, 0, 0, .1);
}
.NB-button div {
background: -webkit-gradient(
linear, left top, left bottom,
from(#E9AF86),
color-stop(0.50, #E9AF86),
color-stop(0.50, #E5A87F),
to(#E5A87F));
border: 1px solid transparent;
border-color: rgba(255, 255, 255, .3) rgba(0, 0, 0, .2) rgba(0, 0, 0, .3) rgba(255, 255, 255, .2);
}
.NB-button.NB-share-button div {
background: -webkit-gradient(
linear, left top, left bottom,
from(#666666),
color-stop(0.50, #555555),
color-stop(0.50, #444444),
to(#333333));
color: #bbbbbb;
text-shadow: 0 1px 0 rgba(255, 255, 255, .5);
}
.NB-button:active div,
.NB-button.NB-button-active div {
background: -webkit-gradient(
linear, left top, left bottom,
from(#6C6D69),
color-stop(0.50, #6C6D69),
color-stop(0.50, #656662),
to(#656662));
}
.NB-button.selected div {
background: #2379bf;
}
.NB-button.NB-share-button:active div,
.NB-button.NB-share-button.NB-button-active div {
color: darkgrey;
text-shadow: 0 1px 0 rgba(0, 0, 0, .2);
}
/* Story Comments */
#story_pane .NB-story-comment {
border-bottom: 1px solid #EAECE8;
background:#111111;
box-shadow: inset 1px 1px 1px rgba(255, 255, 255, 1);shar
}
#story_pane .NB-story-comment .NB-story-comment-username {
color: #1D4BA6;
text-shadow: 0 -1px 0 #F0F0F0;
}
#story_pane .NB-story-comment .NB-story-comment-date {
color: #9D9D9D;
}
#story_pane .NB-story-comment .NB-story-comment-content {
color: #303030;
}
#story_pane .NB-story-comment-reply {
border-top: 1px solid #EAECE8;
}
#story_pane .NB-story-comment-reply-content {
color: #303030;
}
#story_pane .NB-story-comment-reply-form .NB-error {
color: #6A1000;
}
#story_pane .NB-story-comments-public-teaser,
#story_pane .NB-story-comments-public-header,
#story_pane .NB-story-comments-friends-header {
background-color: #B1B6B4;
color: white;
text-shadow: 0 1px 0 #505050;
background-image: -webkit-gradient(linear, left top, left bottom, from(#F5F6F2), to(#E5E6E0));
color: #404040;
text-shadow: 0 1px 0 white;
border-color: rgba(0, 0, 0, .1) transparent rgba(0, 0, 0, .1);
box-shadow: inset 0 1px 1px rgba(0, 0, 0, .05);
}
#story_pane .NB-story-comments-shares-teaser {
background-color: #F5F5EF;
color: #898989;
text-shadow: 0 1px 0 rgba(255, 255, 255, .9);
border-bottom: 1px solid #E3E3DF;
-webkit-box-shadow: inset 0px 1px 1px rgba(0, 0, 0, .1);
}

View file

@ -0,0 +1,242 @@
/**
* Medium Theme overrides
*/
/**
* Universal Style
*/
body {
color: #aaaaaa;
background-color: gray;
}
/* ========== */
/* = Header = */
/* ========== */
.NB-story-title {
color: #313330;
}
.NB-story-title-positive {
color: #58A353;
text-shadow: 0 1px 0 #E9F6E9;
}
.NB-story-title-negative {
color: #B85044;
text-shadow: 0 1px 0 #F6E9E9;
}
.NB-story-permalink {
color: lightgray;
}
.NB-story-date {
color: #818776;
}
.NB-middot {
color: #A0A0A0;
}
.NB-story-author {
color: #959B8B;
text-shadow: 0 1px 0 rgba(255, 255, 255, .5);
}
.NB-story-author-positive {
color: #58A353;
text-shadow: 0 1px 0 #E9F6E9;
}
.NB-story-author-negative {
color: #B85044;
text-shadow: 0 1px 0 #F6E9E9;
}
.NB-story-tag {
background-color: rgba(0, 0, 0, .1);
color: #959B8B;
text-shadow: 0 1px 0 rgba(255, 255, 255, .5);
border-color: rgba(255, 255, 255, .3) transparent rgba(0, 0, 0, .1);
}
.NB-story-tag-positive {
background-color: #88B383;
color: white;
text-shadow: 0 1px 0 #588353;
}
.NB-story-tag-negative {
background-color: #C89094;
color: white;
text-shadow: 0 1px 0 #986064;
}
.NB-story-tag .NB-highlight,
.NB-user-tag .NB-highlight,
.NB-story-author .NB-highlight,
.NB-show-profile .NB-highlight {
background-color: #000;
}
.NB-user-tag {
color: #959B8B;
text-shadow: 0 1px 0 rgba(255, 255, 255, .5);
border-color: rgba(255, 255, 255, .3) transparent rgba(0, 0, 0, .1);
}
.NB-user-tag.NB-add-user-tag {
background: rgba(0, 0, 0, .25) url("add_tag.png") no-repeat 6px 3px;
color: #E5EBDB;
text-shadow: 0 1px 0 rgba(0, 0, 0, .1);
}
.NB-story-starred-date {
color: #818776;
}
a {
color: lightblue;
}
a:active {
color: #82301A;
}
.NB-story blockquote {
color: rgba(10, 12, 38, .8);
}
.NB-header {
color: #bbbbbb;
background-image: -webkit-gradient(linear, left top, left bottom, from(#111111), to(#444444));
border-bottom: 1px solid #C2C5BE;
text-shadow: 0 1px 0 rgba(255, 255, 255, .5);
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}
/* Comments */
.NB-story-comments-group:last-child {
border-bottom: 1px solid #EAECE8;
}
#story_pane .NB-story-comments-shares-teaser.NB-highlighted {
color: #aaaaaa;
background-color: #111111;
}
#story_pane .NB-story-comment-reply.NB-highlighted {
color: #aaaaaa;
background-color: #111111;
}
#story_pane .NB-story-comment.NB-highlighted {
color: #aaaaaa;
background-color: #111111;
}
.NB-story-comment:last-child {
border-bottom: 1px solid #A6A6A6;
}
/* Edit, Like, and Reply buttons */
.NB-button {
text-shadow: 0px 1px 0px rgba(255,255,255,1);
}
.NB-button a {
color: rgba(255, 255, 255, .8);
text-shadow: 0px 1px 0px rgba(0, 0, 0, .1);
}
.NB-button div {
background: -webkit-gradient(
linear, left top, left bottom,
from(#E9AF86),
color-stop(0.50, #E9AF86),
color-stop(0.50, #E5A87F),
to(#E5A87F));
border: 1px solid transparent;
border-color: rgba(255, 255, 255, .3) rgba(0, 0, 0, .2) rgba(0, 0, 0, .3) rgba(255, 255, 255, .2);
}
.NB-button.NB-share-button div {
background: -webkit-gradient(
linear, left top, left bottom,
from(#ECEDE9),
color-stop(0.50, #ECEDE9),
color-stop(0.50, #E5E6E2),
to(#E5E6E2));
color: #B0B2AB;
text-shadow: 0 1px 0 rgba(255, 255, 255, .5);
}
.NB-button:active div,
.NB-button.NB-button-active div {
background: -webkit-gradient(
linear, left top, left bottom,
from(#6C6D69),
color-stop(0.50, #6C6D69),
color-stop(0.50, #656662),
to(#656662));
}
.NB-button.selected div {
background: #2379bf;
}
.NB-button.NB-share-button:active div,
.NB-button.NB-share-button.NB-button-active div {
color: darkgrey;
text-shadow: 0 1px 0 rgba(0, 0, 0, .2);
}
/* Story Comments */
#story_pane .NB-story-comment {
border-bottom: 1px solid #EAECE8;
background:#111111;
box-shadow: inset 1px 1px 1px rgba(255, 255, 255, 1);shar
}
#story_pane .NB-story-comment .NB-story-comment-username {
color: #1D4BA6;
text-shadow: 0 -1px 0 #F0F0F0;
}
#story_pane .NB-story-comment .NB-story-comment-date {
color: #9D9D9D;
}
#story_pane .NB-story-comment .NB-story-comment-content {
color: #303030;
}
#story_pane .NB-story-comment-reply {
border-top: 1px solid #EAECE8;
}
#story_pane .NB-story-comment-reply-content {
color: #303030;
}
#story_pane .NB-story-comment-reply-form .NB-error {
color: #6A1000;
}
#story_pane .NB-story-comments-public-teaser,
#story_pane .NB-story-comments-public-header,
#story_pane .NB-story-comments-friends-header {
background-color: #B1B6B4;
color: white;
text-shadow: 0 1px 0 #505050;
background-image: -webkit-gradient(linear, left top, left bottom, from(#F5F6F2), to(#E5E6E0));
color: #404040;
text-shadow: 0 1px 0 white;
border-color: rgba(0, 0, 0, .1) transparent rgba(0, 0, 0, .1);
box-shadow: inset 0 1px 1px rgba(0, 0, 0, .05);
}
#story_pane .NB-story-comments-shares-teaser {
background-color: #F5F5EF;
color: #898989;
text-shadow: 0 1px 0 rgba(255, 255, 255, .9);
border-bottom: 1px solid #E3E3DF;
-webkit-box-shadow: inset 0px 1px 1px rgba(0, 0, 0, .1);
}

View file

@ -0,0 +1,241 @@
/**
* Sepia Theme overrides
*/
/**
* Universal Style
*/
body {
background-color: #FFFEE5;
}
/* ========== */
/* = Header = */
/* ========== */
.NB-story-title {
color: #313330;
}
.NB-story-title-positive {
color: #58A353;
text-shadow: 0 1px 0 #E9F6E9;
}
.NB-story-title-negative {
color: #B85044;
text-shadow: 0 1px 0 #F6E9E9;
}
.NB-story-permalink {
color: lightgray;
}
.NB-story-date {
color: #818776;
}
.NB-middot {
color: #A0A0A0;
}
.NB-story-author {
color: #959B8B;
text-shadow: 0 1px 0 rgba(255, 255, 255, .5);
}
.NB-story-author-positive {
color: #58A353;
text-shadow: 0 1px 0 #E9F6E9;
}
.NB-story-author-negative {
color: #B85044;
text-shadow: 0 1px 0 #F6E9E9;
}
.NB-story-tag {
background-color: rgba(0, 0, 0, .1);
color: #959B8B;
text-shadow: 0 1px 0 rgba(255, 255, 255, .5);
border-color: rgba(255, 255, 255, .3) transparent rgba(0, 0, 0, .1);
}
.NB-story-tag-positive {
background-color: #88B383;
color: white;
text-shadow: 0 1px 0 #588353;
}
.NB-story-tag-negative {
background-color: #C89094;
color: white;
text-shadow: 0 1px 0 #986064;
}
.NB-story-tag .NB-highlight,
.NB-user-tag .NB-highlight,
.NB-story-author .NB-highlight,
.NB-show-profile .NB-highlight {
background-color: #000;
}
.NB-user-tag {
color: #959B8B;
text-shadow: 0 1px 0 rgba(255, 255, 255, .5);
border-color: rgba(255, 255, 255, .3) transparent rgba(0, 0, 0, .1);
}
.NB-user-tag.NB-add-user-tag {
background: rgba(0, 0, 0, .25) url("add_tag.png") no-repeat 6px 3px;
color: #E5EBDB;
text-shadow: 0 1px 0 rgba(0, 0, 0, .1);
}
.NB-story-starred-date {
color: #818776;
}
a {
color: #1B248C ;
}
a:active {
color: #82301A;
}
.NB-story blockquote {
color: rgba(10, 12, 38, .8);
}
.NB-header {
color: #bbbbbb;
background-image: -webkit-gradient(linear, left top, left bottom, from(#111111), to(#444444));
border-bottom: 1px solid #C2C5BE;
text-shadow: 0 1px 0 rgba(255, 255, 255, .5);
-webkit-tap-highlight-color: rgba(0, 0, 0, 0);
}
/* Comments */
.NB-story-comments-group:last-child {
border-bottom: 1px solid #EAECE8;
}
#story_pane .NB-story-comments-shares-teaser.NB-highlighted {
color: #aaaaaa;
background-color: #111111;
}
#story_pane .NB-story-comment-reply.NB-highlighted {
color: #aaaaaa;
background-color: #111111;
}
#story_pane .NB-story-comment.NB-highlighted {
color: #aaaaaa;
background-color: #111111;
}
.NB-story-comment:last-child {
border-bottom: 1px solid #A6A6A6;
}
/* Edit, Like, and Reply buttons */
.NB-button {
text-shadow: 0px 1px 0px rgba(255,255,255,1);
}
.NB-button a {
color: rgba(255, 255, 255, .8);
text-shadow: 0px 1px 0px rgba(0, 0, 0, .1);
}
.NB-button div {
background: -webkit-gradient(
linear, left top, left bottom,
from(#E9AF86),
color-stop(0.50, #E9AF86),
color-stop(0.50, #E5A87F),
to(#E5A87F));
border: 1px solid transparent;
border-color: rgba(255, 255, 255, .3) rgba(0, 0, 0, .2) rgba(0, 0, 0, .3) rgba(255, 255, 255, .2);
}
.NB-button.NB-share-button div {
background: -webkit-gradient(
linear, left top, left bottom,
from(#ECEDE9),
color-stop(0.50, #ECEDE9),
color-stop(0.50, #E5E6E2),
to(#E5E6E2));
color: #B0B2AB;
text-shadow: 0 1px 0 rgba(255, 255, 255, .5);
}
.NB-button:active div,
.NB-button.NB-button-active div {
background: -webkit-gradient(
linear, left top, left bottom,
from(#6C6D69),
color-stop(0.50, #6C6D69),
color-stop(0.50, #656662),
to(#656662));
}
.NB-button.selected div {
background: #2379bf;
}
.NB-button.NB-share-button:active div,
.NB-button.NB-share-button.NB-button-active div {
color: darkgrey;
text-shadow: 0 1px 0 rgba(0, 0, 0, .2);
}
/* Story Comments */
#story_pane .NB-story-comment {
border-bottom: 1px solid #EAECE8;
background:#111111;
box-shadow: inset 1px 1px 1px rgba(255, 255, 255, 1);shar
}
#story_pane .NB-story-comment .NB-story-comment-username {
color: #1D4BA6;
text-shadow: 0 -1px 0 #F0F0F0;
}
#story_pane .NB-story-comment .NB-story-comment-date {
color: #9D9D9D;
}
#story_pane .NB-story-comment .NB-story-comment-content {
color: #303030;
}
#story_pane .NB-story-comment-reply {
border-top: 1px solid #EAECE8;
}
#story_pane .NB-story-comment-reply-content {
color: #303030;
}
#story_pane .NB-story-comment-reply-form .NB-error {
color: #6A1000;
}
#story_pane .NB-story-comments-public-teaser,
#story_pane .NB-story-comments-public-header,
#story_pane .NB-story-comments-friends-header {
background-color: #B1B6B4;
color: white;
text-shadow: 0 1px 0 #505050;
background-image: -webkit-gradient(linear, left top, left bottom, from(#F5F6F2), to(#E5E6E0));
color: #404040;
text-shadow: 0 1px 0 white;
border-color: rgba(0, 0, 0, .1) transparent rgba(0, 0, 0, .1);
box-shadow: inset 0 1px 1px rgba(0, 0, 0, .05);
}
#story_pane .NB-story-comments-shares-teaser {
background-color: #F5F5EF;
color: #898989;
text-shadow: 0 1px 0 rgba(255, 255, 255, .9);
border-bottom: 1px solid #E3E3DF;
-webkit-box-shadow: inset 0px 1px 1px rgba(0, 0, 0, .1);
}