mirror of
https://github.com/oxen-io/session-ios.git
synced 2023-12-13 21:30:14 +01:00
Align top row by baseline
// FREEBIE
This commit is contained in:
parent
743867859f
commit
8ca62a8d44
|
@ -103,7 +103,7 @@ NS_ASSUME_NONNULL_BEGIN
|
|||
self.dateTimeLabel,
|
||||
]];
|
||||
self.topRowView.axis = UILayoutConstraintAxisHorizontal;
|
||||
self.topRowView.alignment = UIStackViewAlignmentBottom;
|
||||
self.topRowView.alignment = UIStackViewAlignmentLastBaseline;
|
||||
[self.payloadView addArrangedSubview:self.topRowView];
|
||||
|
||||
self.snippetLabel = [UILabel new];
|
||||
|
@ -189,11 +189,8 @@ NS_ASSUME_NONNULL_BEGIN
|
|||
} else {
|
||||
[self.contentView addSubview:self.unreadBadge];
|
||||
|
||||
self.unreadLabel.text = [OWSFormat formatInt:unreadCount];
|
||||
self.unreadLabel.text = [OWSFormat formatInt:(int)unreadCount];
|
||||
|
||||
// TODO: Will this localize? It assumes that the worst case
|
||||
// unread count (99) will fit horizontally into some multiple
|
||||
// N of the font's line height.
|
||||
const int unreadBadgeHeight = (int)ceil(self.unreadLabel.font.lineHeight * 1.5f);
|
||||
self.unreadBadge.layer.cornerRadius = unreadBadgeHeight / 2;
|
||||
|
||||
|
|
Loading…
Reference in a new issue