mirror of
https://github.com/viq/NewsBlur.git
synced 2025-09-18 21:43:31 +00:00
Fixing styling on notifications titles.
This commit is contained in:
parent
3121fa2341
commit
32ee1b7865
1 changed files with 14 additions and 17 deletions
|
@ -70,6 +70,17 @@
|
||||||
[self.notificationTypeControl setTitleTextAttributes:controlAttrs forState:UIControlStateNormal];
|
[self.notificationTypeControl setTitleTextAttributes:controlAttrs forState:UIControlStateNormal];
|
||||||
self.notificationTypeControl.frame = CGRectMake(36, 76, CGRectGetWidth(self.frame), 28);
|
self.notificationTypeControl.frame = CGRectMake(36, 76, CGRectGetWidth(self.frame), 28);
|
||||||
[self.contentView addSubview:self.notificationTypeControl];
|
[self.contentView addSubview:self.notificationTypeControl];
|
||||||
|
|
||||||
|
self.textLabel.backgroundColor = [UIColor clearColor];
|
||||||
|
self.textLabel.textColor = UIColorFromRGB(0x303030);
|
||||||
|
self.textLabel.shadowColor = UIColorFromRGB(0xF0F0F0);
|
||||||
|
self.textLabel.shadowOffset = CGSizeMake(0, 1);
|
||||||
|
self.textLabel.highlightedTextColor = UIColorFromRGB(0x303030);
|
||||||
|
self.detailTextLabel.highlightedTextColor = UIColorFromRGB(0x505050);
|
||||||
|
self.detailTextLabel.textColor = UIColorFromRGB(0x505050);
|
||||||
|
self.backgroundColor = UIColorFromRGB(0xFFFFFF);
|
||||||
|
self.backgroundView.backgroundColor = UIColorFromRGB(0xFFFFFF);
|
||||||
|
self.selectedBackgroundView.backgroundColor = UIColorFromRGB(0xECEEEA);
|
||||||
}
|
}
|
||||||
|
|
||||||
return self;
|
return self;
|
||||||
|
@ -81,17 +92,12 @@
|
||||||
self.imageView.frame = CGRectMake(10.0, 10.0, 16.0, 16.0);
|
self.imageView.frame = CGRectMake(10.0, 10.0, 16.0, 16.0);
|
||||||
self.imageView.contentMode = UIViewContentModeScaleAspectFit;
|
self.imageView.contentMode = UIViewContentModeScaleAspectFit;
|
||||||
|
|
||||||
|
[self.textLabel sizeToFit];
|
||||||
CGRect frame = self.textLabel.frame;
|
CGRect frame = self.textLabel.frame;
|
||||||
frame.origin.x = 35.0;
|
frame.origin.x = 35.0;
|
||||||
frame.size.width = self.detailTextLabel.frame.origin.x - self.textLabel.frame.origin.x;
|
frame.size.width = self.detailTextLabel.frame.origin.x - self.textLabel.frame.origin.x;
|
||||||
self.textLabel.frame = frame;
|
self.textLabel.frame = frame;
|
||||||
|
CGRect textFrame = self.textLabel.frame;
|
||||||
self.textLabel.backgroundColor = [UIColor clearColor];
|
|
||||||
self.textLabel.textColor = UIColorFromRGB(0x303030);
|
|
||||||
self.textLabel.shadowColor = UIColorFromRGB(0xF0F0F0);
|
|
||||||
self.textLabel.shadowOffset = CGSizeMake(0, 1);
|
|
||||||
|
|
||||||
CGRect textFrame = self.textLabel.frame;
|
|
||||||
textFrame.origin.y = 10;
|
textFrame.origin.y = 10;
|
||||||
self.textLabel.frame = textFrame;
|
self.textLabel.frame = textFrame;
|
||||||
|
|
||||||
|
@ -99,15 +105,6 @@
|
||||||
detailFrame.origin.y = 10;
|
detailFrame.origin.y = 10;
|
||||||
self.detailTextLabel.frame = detailFrame;
|
self.detailTextLabel.frame = detailFrame;
|
||||||
|
|
||||||
self.textLabel.highlightedTextColor = UIColorFromRGB(0x303030);
|
|
||||||
self.detailTextLabel.highlightedTextColor = UIColorFromRGB(0x505050);
|
|
||||||
|
|
||||||
self.detailTextLabel.textColor = UIColorFromRGB(0x505050);
|
|
||||||
|
|
||||||
self.backgroundColor = UIColorFromRGB(0xFFFFFF);
|
|
||||||
self.backgroundView.backgroundColor = UIColorFromRGB(0xFFFFFF);
|
|
||||||
self.selectedBackgroundView.backgroundColor = UIColorFromRGB(0xECEEEA);
|
|
||||||
|
|
||||||
CGFloat detailTextLabelWidth = self.detailTextLabel.attributedText.size.width;
|
CGFloat detailTextLabelWidth = self.detailTextLabel.attributedText.size.width;
|
||||||
CGRect detailTextLabelFrame = self.detailTextLabel.frame;
|
CGRect detailTextLabelFrame = self.detailTextLabel.frame;
|
||||||
CGFloat detailTextLabelExtraWidth = detailTextLabelWidth - detailTextLabelFrame.size.width;
|
CGFloat detailTextLabelExtraWidth = detailTextLabelWidth - detailTextLabelFrame.size.width;
|
||||||
|
@ -117,7 +114,7 @@
|
||||||
self.detailTextLabel.frame = detailTextLabelFrame;
|
self.detailTextLabel.frame = detailTextLabelFrame;
|
||||||
|
|
||||||
CGRect textLabelFrame = self.textLabel.frame;
|
CGRect textLabelFrame = self.textLabel.frame;
|
||||||
textLabelFrame.size.width -= detailTextLabelExtraWidth;
|
textLabelFrame.size.width = self.detailTextLabel.frame.origin.x - self.textLabel.frame.origin.x;
|
||||||
self.textLabel.frame = textLabelFrame;
|
self.textLabel.frame = textLabelFrame;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue