#1442 (UI updates)

This commit is contained in:
David Sinclair 2021-03-27 17:46:34 -07:00
parent 9ede6c39ad
commit 04064cb876
6 changed files with 24 additions and 43 deletions

View file

@ -1840,15 +1840,15 @@ heightForRowAtIndexPath:(NSIndexPath *)indexPath {
if (![userPreferences boolForKey:@"use_system_font_size"]) {
if ([[userPreferences stringForKey:@"feed_list_font_size"] isEqualToString:@"xs"]) {
fontDescriptor = [fontDescriptor fontDescriptorWithSize:11.0f];
fontDescriptor = [fontDescriptor fontDescriptorWithSize:10.0f];
} else if ([[userPreferences stringForKey:@"feed_list_font_size"] isEqualToString:@"small"]) {
fontDescriptor = [fontDescriptor fontDescriptorWithSize:13.0f];
fontDescriptor = [fontDescriptor fontDescriptorWithSize:12.0f];
} else if ([[userPreferences stringForKey:@"feed_list_font_size"] isEqualToString:@"medium"]) {
fontDescriptor = [fontDescriptor fontDescriptorWithSize:14.0f];
fontDescriptor = [fontDescriptor fontDescriptorWithSize:13.0f];
} else if ([[userPreferences stringForKey:@"feed_list_font_size"] isEqualToString:@"large"]) {
fontDescriptor = [fontDescriptor fontDescriptorWithSize:17.0f];
fontDescriptor = [fontDescriptor fontDescriptorWithSize:16.0f];
} else if ([[userPreferences stringForKey:@"feed_list_font_size"] isEqualToString:@"xl"]) {
fontDescriptor = [fontDescriptor fontDescriptorWithSize:19.0f];
fontDescriptor = [fontDescriptor fontDescriptorWithSize:18.0f];
}
}
return fontDescriptor;

View file

@ -143,15 +143,15 @@ static UIFont *indicatorFont = nil;
fontDescriptor = [UIFontDescriptor preferredFontDescriptorWithTextStyle:textStyle];
if (![userPreferences boolForKey:@"use_system_font_size"]) {
if ([[userPreferences stringForKey:@"feed_list_font_size"] isEqualToString:@"xs"]) {
fontDescriptor = [fontDescriptor fontDescriptorWithSize:12.0f];
fontDescriptor = [fontDescriptor fontDescriptorWithSize:11.0f];
} else if ([[userPreferences stringForKey:@"feed_list_font_size"] isEqualToString:@"small"]) {
fontDescriptor = [fontDescriptor fontDescriptorWithSize:14.0f];
fontDescriptor = [fontDescriptor fontDescriptorWithSize:13.0f];
} else if ([[userPreferences stringForKey:@"feed_list_font_size"] isEqualToString:@"medium"]) {
fontDescriptor = [fontDescriptor fontDescriptorWithSize:15.0f];
fontDescriptor = [fontDescriptor fontDescriptorWithSize:14.0f];
} else if ([[userPreferences stringForKey:@"feed_list_font_size"] isEqualToString:@"large"]) {
fontDescriptor = [fontDescriptor fontDescriptorWithSize:17.0f];
fontDescriptor = [fontDescriptor fontDescriptorWithSize:16.0f];
} else if ([[userPreferences stringForKey:@"feed_list_font_size"] isEqualToString:@"xl"]) {
fontDescriptor = [fontDescriptor fontDescriptorWithSize:19.0f];
fontDescriptor = [fontDescriptor fontDescriptorWithSize:18.0f];
}
}
@ -335,10 +335,10 @@ static UIFont *indicatorFont = nil;
if (cell.isRead) {
textColor = UIColorFromLightSepiaMediumDarkRGB(0xB8B8B8, 0xB8B8B8, 0xA0A0A0, 0x707070);
font = [UIFont fontWithName:@"WhitneySSm-Book" size:fontDescriptor.pointSize];
font = [UIFont fontWithName:@"WhitneySSm-Book" size:fontDescriptor.pointSize - 1];
} else {
textColor = UIColorFromLightSepiaMediumDarkRGB(0x404040, 0x404040, 0xC0C0C0, 0xB0B0B0);
font = [UIFont fontWithName:@"WhitneySSm-Book" size:fontDescriptor.pointSize];
font = [UIFont fontWithName:@"WhitneySSm-Book" size:fontDescriptor.pointSize - 1];
}
if (cell.highlighted || cell.selected) {
if (cell.isRead) {
@ -362,18 +362,17 @@ static UIFont *indicatorFont = nil;
int storyAuthorDateY = r.size.height - 18;
if (cell.isRead) {
textColor = UIColorFromLightSepiaMediumDarkRGB(0xBABDD1, 0xBABDD1, 0x52535d, 0x21366e);
font = [UIFont fontWithName:@"WhitneySSm-Book" size:11];
textColor = UIColorFromLightSepiaMediumDarkRGB(0xB8B8B8, 0xB8B8B8, 0x909090, 0x404040);
font = [UIFont fontWithName:@"WhitneySSm-Medium" size:11];
} else {
textColor = UIColorFromLightSepiaMediumDarkRGB(0x262C6C, 0x262C6C, 0x363C5C, 0x21468e);
textColor = UIColorFromLightSepiaMediumDarkRGB(0xA6A8A2, 0xA6A8A2, 0x909090, 0x505050);
font = [UIFont fontWithName:@"WhitneySSm-Medium" size:11];
}
if (cell.highlighted || cell.selected) {
if (cell.isRead) {
textColor = UIColorFromLightSepiaMediumDarkRGB(0xAAADC1, 0xAAADC1, 0x72738d, 0x35363A);
textColor = UIColorFromLightSepiaMediumDarkRGB(0xA8A8A8, 0xA8A8A8, 0x999999, 0x808080);
} else {
textColor = UIColorFromLightSepiaMediumDarkRGB(0x5A5D91, 0x5A5D91, 0x666C8C, 0x11367e);
textColor = UIColorFromLightSepiaMediumDarkRGB(0x959595, 0x959595, 0xA0A0A0, 0x909090);
}
}
@ -389,21 +388,6 @@ static UIFont *indicatorFont = nil;
NSParagraphStyleAttributeName: paragraphStyle}];
// Story author
if (cell.isRead) {
textColor = UIColorFromLightSepiaMediumDarkRGB(0xB8B8B8, 0xB8B8B8, 0x909090, 0x404040);
font = [UIFont fontWithName:@"WhitneySSm-Medium" size:11];
} else {
textColor = UIColorFromLightSepiaMediumDarkRGB(0xA6A8A2, 0xA6A8A2, 0x909090, 0x505050);
font = [UIFont fontWithName:@"WhitneySSm-Medium" size:11];
}
if (cell.highlighted || cell.selected) {
if (cell.isRead) {
textColor = UIColorFromLightSepiaMediumDarkRGB(0xA8A8A8, 0xA8A8A8, 0x999999, 0x303030);
} else {
textColor = UIColorFromLightSepiaMediumDarkRGB(0x959595, 0x959595, 0xA0A0A0, 0x404040);
}
}
paragraphStyle.alignment = NSTextAlignmentLeft;
[cell.storyAuthor
drawInRect:CGRectMake(leftMargin, storyAuthorDateY, dateRect.size.width - dateSize.width - 12, 15.0)

View file

@ -145,7 +145,7 @@
paragraphStyle.lineBreakMode = NSLineBreakByTruncatingTail;
paragraphStyle.alignment = NSTextAlignmentLeft;
[folderTitle
drawInRect:CGRectMake(36.0, titleOffsetY, rect.size.width - 36 - 36 - countWidth, font.pointSize)
drawInRect:CGRectMake(36.0, titleOffsetY, rect.size.width - 36 - 36 - countWidth, font.pointSize + 5)
withAttributes:@{NSFontAttributeName: font,
NSForegroundColorAttributeName: textColor,
NSParagraphStyleAttributeName: paragraphStyle}];

View file

@ -3374,7 +3374,7 @@
titleLabel.textAlignment = NSTextAlignmentLeft;
titleLabel.lineBreakMode = NSLineBreakByTruncatingTail;
titleLabel.numberOfLines = 1;
titleLabel.font = [UIFont fontWithName:@"WhitneySSm-Medium" size:11.0];
titleLabel.font = [UIFont fontWithName:@"WhitneySSm-Medium" size:13.0];
titleLabel.shadowOffset = CGSizeMake(0, 1);
if ([[feed objectForKey:@"favicon_text_color"] class] != [NSNull class]) {
BOOL lightText = [[feed objectForKey:@"favicon_text_color"]
@ -3390,12 +3390,12 @@
titleLabel.textColor = UIColorFromFixedRGB(NEWSBLUR_WHITE_COLOR);
titleLabel.shadowColor = UIColorFromFixedRGB(NEWSBLUR_BLACK_COLOR);
}
titleLabel.frame = CGRectMake(32, 1, rect.size.width-32, 20);
titleLabel.frame = CGRectMake(32, 2, rect.size.width-32, 22);
NSString *feedIdStr = [NSString stringWithFormat:@"%@", [feed objectForKey:@"id"]];
UIImage *titleImage = [self getFavicon:feedIdStr];
UIImageView *titleImageView = [[UIImageView alloc] initWithImage:titleImage];
titleImageView.frame = CGRectMake(8, 3, 16.0, 16.0);
titleImageView.frame = CGRectMake(8, 5, 16.0, 16.0);
[titleLabel addSubview:titleImageView];
[gradientView addSubview:titleLabel];

View file

@ -663,7 +663,7 @@
self.feedTitleGradient = [appDelegate
makeFeedTitleGradient:feed
withRect:CGRectMake(0, yOffset, CGRectGetWidth(self.view.bounds), 21)]; // 1024 hack for self.webView.frame.size.width
withRect:CGRectMake(0, yOffset, CGRectGetWidth(self.view.bounds), 25)]; // 1024 hack for self.webView.frame.size.width
self.feedTitleGradient.autoresizingMask = UIViewAutoresizingFlexibleWidth;
self.feedTitleGradient.tag = FEED_TITLE_GRADIENT_TAG; // Not attached yet. Remove old gradients, first.
@ -677,7 +677,7 @@
appDelegate.storiesCollection.isSocialView ||
appDelegate.storiesCollection.isSavedView ||
appDelegate.storiesCollection.isReadView) {
self.webView.scrollView.scrollIndicatorInsets = UIEdgeInsetsMake(20, 0, 0, 0);
self.webView.scrollView.scrollIndicatorInsets = UIEdgeInsetsMake(24, 0, 0, 0);
} else {
self.webView.scrollView.scrollIndicatorInsets = UIEdgeInsetsMake(9, 0, 0, 0);
}

View file

@ -832,7 +832,6 @@ a.NB-show-profile {
font-weight: bold;
color: rgba(255, 255, 255, .8);
text-shadow: 0px 1px 0px rgba(0, 0, 0, .1);
text-transform: uppercase;
}
.NB-button.active a,
@ -1082,7 +1081,6 @@ a.NB-show-profile {
#story_pane .NB-story-comment .NB-story-comment-location {
text-transform: uppercase;
font-size: 10px;
color: rgba(0, 0, 0, .2);
font-weight: bold;
@ -1178,7 +1176,6 @@ a.NB-show-profile {
color: white;
text-shadow: 0 1px 0 #505050;
font-weight: bold;
text-transform: uppercase;
font-size: 10px;
overflow: hidden;
background-image: -webkit-gradient(linear, left top, left bottom, from(#F5F6F2), to(#E5E6E0));