mirror of
https://github.com/samuelclay/NewsBlur.git
synced 2025-08-05 16:58:59 +00:00
Fixing interactions and activities sizing.
This commit is contained in:
parent
0642b9471e
commit
168e5ee4b5
5 changed files with 15 additions and 12 deletions
|
@ -58,9 +58,9 @@
|
||||||
|
|
||||||
// position label to bounds
|
// position label to bounds
|
||||||
labelFrame.origin.x = leftMargin*2 + avatarSize;
|
labelFrame.origin.x = leftMargin*2 + avatarSize;
|
||||||
labelFrame.origin.y = topMargin - 1;
|
labelFrame.origin.y = 0;
|
||||||
labelFrame.size.width = contentRect.size.width - leftMargin - avatarSize - leftMargin - rightMargin - 20;
|
labelFrame.size.width = contentRect.size.width - leftMargin - avatarSize - leftMargin - rightMargin - 20;
|
||||||
labelFrame.size.height = contentRect.size.height - topMargin - bottomMargin;
|
labelFrame.size.height = contentRect.size.height;
|
||||||
self.activityLabel.frame = labelFrame;
|
self.activityLabel.frame = labelFrame;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -108,8 +108,8 @@
|
||||||
feedId = [activity objectForKey:@"story_feed_id"];
|
feedId = [activity objectForKey:@"story_feed_id"];
|
||||||
}
|
}
|
||||||
if (feedId && [feedId class] != [NSNull class]) {
|
if (feedId && [feedId class] != [NSNull class]) {
|
||||||
NSString *faviconUrl = [NSString stringWithFormat:@"%@/rss_feeds/icon/%i",
|
NSString *faviconUrl = [NSString stringWithFormat:@"%@/%i",
|
||||||
NEWSBLUR_URL,
|
ICONS_HOST,
|
||||||
[feedId intValue]];
|
[feedId intValue]];
|
||||||
[self.faviconView setImageWithURL:[NSURL URLWithString:faviconUrl]
|
[self.faviconView setImageWithURL:[NSURL URLWithString:faviconUrl]
|
||||||
placeholderImage:nil];
|
placeholderImage:nil];
|
||||||
|
|
|
@ -42,8 +42,8 @@
|
||||||
myBackView.backgroundColor = UIColorFromRGB(NEWSBLUR_HIGHLIGHT_COLOR);
|
myBackView.backgroundColor = UIColorFromRGB(NEWSBLUR_HIGHLIGHT_COLOR);
|
||||||
self.selectedBackgroundView = myBackView;
|
self.selectedBackgroundView = myBackView;
|
||||||
|
|
||||||
topMargin = 15;
|
topMargin = 12;
|
||||||
bottomMargin = 15;
|
bottomMargin = 12;
|
||||||
leftMargin = 20;
|
leftMargin = 20;
|
||||||
rightMargin = 20;
|
rightMargin = 20;
|
||||||
avatarSize = 48;
|
avatarSize = 48;
|
||||||
|
@ -65,9 +65,9 @@
|
||||||
|
|
||||||
// position label to bounds
|
// position label to bounds
|
||||||
labelFrame.origin.x = leftMargin*2 + avatarSize;
|
labelFrame.origin.x = leftMargin*2 + avatarSize;
|
||||||
labelFrame.origin.y = topMargin - 1;
|
labelFrame.origin.y = 0;
|
||||||
labelFrame.size.width = contentRect.size.width - leftMargin - avatarSize - leftMargin - rightMargin - 20;
|
labelFrame.size.width = contentRect.size.width - leftMargin - avatarSize - leftMargin - rightMargin - 20;
|
||||||
labelFrame.size.height = contentRect.size.height - topMargin - bottomMargin;
|
labelFrame.size.height = contentRect.size.height;
|
||||||
self.interactionLabel.frame = labelFrame;
|
self.interactionLabel.frame = labelFrame;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -52,9 +52,9 @@
|
||||||
|
|
||||||
// position label to bounds
|
// position label to bounds
|
||||||
labelFrame.origin.x = leftMargin*2 + avatarSize;
|
labelFrame.origin.x = leftMargin*2 + avatarSize;
|
||||||
labelFrame.origin.y = topMargin - 1;
|
labelFrame.origin.y = 0;
|
||||||
labelFrame.size.width = contentRect.size.width - leftMargin - avatarSize - leftMargin - rightMargin - 20;
|
labelFrame.size.width = contentRect.size.width - leftMargin - avatarSize - leftMargin - rightMargin - 20;
|
||||||
labelFrame.size.height = contentRect.size.height - topMargin - bottomMargin;
|
labelFrame.size.height = contentRect.size.height;
|
||||||
self.activityLabel.frame = labelFrame;
|
self.activityLabel.frame = labelFrame;
|
||||||
|
|
||||||
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) {
|
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) {
|
||||||
|
|
|
@ -52,9 +52,9 @@
|
||||||
|
|
||||||
// position label to bounds
|
// position label to bounds
|
||||||
labelFrame.origin.x = leftMargin*2 + avatarSize;
|
labelFrame.origin.x = leftMargin*2 + avatarSize;
|
||||||
labelFrame.origin.y = topMargin - 1;
|
labelFrame.origin.y = 0;
|
||||||
labelFrame.size.width = contentRect.size.width - leftMargin - avatarSize - leftMargin - rightMargin - 20;
|
labelFrame.size.width = contentRect.size.width - leftMargin - avatarSize - leftMargin - rightMargin - 20;
|
||||||
labelFrame.size.height = contentRect.size.height - topMargin - bottomMargin;
|
labelFrame.size.height = contentRect.size.height;
|
||||||
self.interactionLabel.frame = labelFrame;
|
self.interactionLabel.frame = labelFrame;
|
||||||
|
|
||||||
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) {
|
if (UI_USER_INTERFACE_IDIOM() == UIUserInterfaceIdiomPad) {
|
||||||
|
|
|
@ -12,14 +12,17 @@
|
||||||
#define BACKGROUND_REFRESH_SECONDS -5
|
#define BACKGROUND_REFRESH_SECONDS -5
|
||||||
#define NEWSBLUR_URL [NSString stringWithFormat:@"http://nb.local.com"]
|
#define NEWSBLUR_URL [NSString stringWithFormat:@"http://nb.local.com"]
|
||||||
#define NEWSBLUR_HOST [NSString stringWithFormat:@"nb.local.com"]
|
#define NEWSBLUR_HOST [NSString stringWithFormat:@"nb.local.com"]
|
||||||
|
#define ICONS_HOST [NSString stringWithFormat:@"http://nb.local.com/rss_feeds/icon"]
|
||||||
#elif PROD_DEBUG
|
#elif PROD_DEBUG
|
||||||
#define BACKGROUND_REFRESH_SECONDS -5
|
#define BACKGROUND_REFRESH_SECONDS -5
|
||||||
#define NEWSBLUR_URL [NSString stringWithFormat:@"http://debug.newsblur.com"]
|
#define NEWSBLUR_URL [NSString stringWithFormat:@"http://debug.newsblur.com"]
|
||||||
#define NEWSBLUR_HOST [NSString stringWithFormat:@"debug.newsblur.com"]
|
#define NEWSBLUR_HOST [NSString stringWithFormat:@"debug.newsblur.com"]
|
||||||
|
#define ICONS_HOST [NSString stringWithFormat:@"https://s3.amazonaws.com/icons.newsblur.com"]
|
||||||
#else
|
#else
|
||||||
#define BACKGROUND_REFRESH_SECONDS -10*60
|
#define BACKGROUND_REFRESH_SECONDS -10*60
|
||||||
#define NEWSBLUR_URL [NSString stringWithFormat:@"https://www.newsblur.com"]
|
#define NEWSBLUR_URL [NSString stringWithFormat:@"https://www.newsblur.com"]
|
||||||
#define NEWSBLUR_HOST [NSString stringWithFormat:@"www.newsblur.com"]
|
#define NEWSBLUR_HOST [NSString stringWithFormat:@"www.newsblur.com"]
|
||||||
|
#define ICONS_HOST [NSString stringWithFormat:@"https://s3.amazonaws.com/icons.newsblur.com"]
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define _ Underscore
|
#define _ Underscore
|
||||||
|
|
Loading…
Add table
Reference in a new issue