decrease header spacing from 32->28.

Previous spacing was based on applying the "full width" gutter spacing twice.
pull/1/head
Michael Kirk 7 years ago
parent 5fc21b69e6
commit fef6c64bdc

@ -151,8 +151,8 @@ NS_ASSUME_NONNULL_BEGIN
[self.contentView addSubview:self.headerView];
[self.viewConstraints addObjectsFromArray:@[
[self.headerView autoSetDimension:ALDimensionHeight toSize:headerHeight],
[self.headerView autoPinLeadingToSuperviewMarginWithInset:self.conversationStyle.fullWidthGutterLeading],
[self.headerView autoPinTrailingToSuperviewMarginWithInset:self.conversationStyle.fullWidthGutterTrailing],
[self.headerView autoPinLeadingToSuperviewMarginWithInset:self.conversationStyle.headerGutterLeading],
[self.headerView autoPinTrailingToSuperviewMarginWithInset:self.conversationStyle.headerGutterTrailing],
[self.headerView autoPinEdgeToSuperviewEdge:ALEdgeTop],
[self.messageBubbleView autoPinEdge:ALEdgeTop toEdge:ALEdgeBottom ofView:self.headerView],
]];

@ -93,8 +93,8 @@ const CGFloat OWSMessageHeaderViewDateHeaderVMargin = 23;
[self.strokeView autoSetDimension:ALDimensionHeight toSize:strokeThickness],
[self.stackView autoPinEdgeToSuperviewEdge:ALEdgeTop],
[self.stackView autoPinEdgeToSuperviewEdge:ALEdgeLeading withInset:conversationStyle.fullWidthGutterLeading],
[self.stackView autoPinEdgeToSuperviewEdge:ALEdgeTrailing withInset:conversationStyle.fullWidthGutterTrailing],
[self.stackView autoPinEdgeToSuperviewEdge:ALEdgeLeading],
[self.stackView autoPinEdgeToSuperviewEdge:ALEdgeTrailing],
];
}

@ -23,10 +23,15 @@ public class ConversationStyle: NSObject {
@objc public var gutterLeading: CGFloat = 0
@objc public var gutterTrailing: CGFloat = 0
@objc public var headerGutterLeading: CGFloat = 28
@objc public var headerGutterTrailing: CGFloat = 28
// These are the gutters used by "full width" views
// like "date headers" and "unread indicator".
// like "contact offer" and "info message".
@objc public var fullWidthGutterLeading: CGFloat = 0
@objc public var fullWidthGutterTrailing: CGFloat = 0
@objc public var errorGutterTrailing: CGFloat = 0
// viewWidth - (gutterLeading + gutterTrailing)
@ -88,6 +93,8 @@ public class ConversationStyle: NSObject {
}
fullWidthGutterLeading = 16
fullWidthGutterTrailing = 16
headerGutterLeading = 28
headerGutterTrailing = 28
errorGutterTrailing = 16
contentWidth = viewWidth - (gutterLeading + gutterTrailing)

Loading…
Cancel
Save