mirror of
https://github.com/samuelclay/NewsBlur.git
synced 2025-08-31 21:41:33 +00:00
iOS: Preferably truncate feed title rather than statistic text in organizer/mute.
Without this, long feed titles often mean you can’t see the statistic at all.
This commit is contained in:
parent
d31562585e
commit
2d25e4c4a5
1 changed files with 13 additions and 0 deletions
|
@ -65,6 +65,19 @@
|
|||
self.backgroundColor = UIColorFromRGB(0xFFFFFF);
|
||||
self.backgroundView.backgroundColor = UIColorFromRGB(0xFFFFFF);
|
||||
self.selectedBackgroundView.backgroundColor = UIColorFromRGB(0xECEEEA);
|
||||
|
||||
CGFloat detailTextLabelWidth = self.detailTextLabel.attributedText.size.width;
|
||||
CGRect detailTextLabelFrame = self.detailTextLabel.frame;
|
||||
CGFloat detailTextLabelExtraWidth = detailTextLabelWidth - detailTextLabelFrame.size.width;
|
||||
if (detailTextLabelExtraWidth > 0) {
|
||||
detailTextLabelFrame.origin.x -= detailTextLabelExtraWidth;
|
||||
detailTextLabelFrame.size.width = detailTextLabelWidth;
|
||||
self.detailTextLabel.frame = detailTextLabelFrame;
|
||||
|
||||
CGRect textLabelFrame = self.textLabel.frame;
|
||||
textLabelFrame.size.width -= detailTextLabelExtraWidth;
|
||||
self.textLabel.frame = textLabelFrame;
|
||||
}
|
||||
}
|
||||
|
||||
@end
|
||||
|
|
Loading…
Add table
Reference in a new issue