Merge branch 'charlesmchen/refineConversationStyle'

pull/1/head
Matthew Chen 7 years ago
commit 538cd4f893

@ -48,8 +48,8 @@ public class ConversationStyle: NSObject {
} }
} }
@objc public let contentMarginTop: CGFloat = 10 @objc public let contentMarginTop: CGFloat = 24
@objc public let contentMarginBottom: CGFloat = 10 @objc public let contentMarginBottom: CGFloat = 24
@objc public var gutterLeading: CGFloat = 0 @objc public var gutterLeading: CGFloat = 0
@objc public var gutterTrailing: CGFloat = 0 @objc public var gutterTrailing: CGFloat = 0
@ -66,6 +66,8 @@ public class ConversationStyle: NSObject {
@objc public var fullWidthContentWidth: CGFloat = 0 @objc public var fullWidthContentWidth: CGFloat = 0
@objc public var maxMessageWidth: CGFloat = 0 @objc public var maxMessageWidth: CGFloat = 0
// TODO: Can we eliminate this after moving timestamps and
// message status inside the message bubbles.
@objc public var maxFooterWidth: CGFloat = 0 @objc public var maxFooterWidth: CGFloat = 0
@objc public var textInsets = OWSDirectionalEdgeInsets.zero @objc public var textInsets = OWSDirectionalEdgeInsets.zero
@ -114,15 +116,14 @@ public class ConversationStyle: NSObject {
gutterLeading = 16 gutterLeading = 16
gutterTrailing = 20 gutterTrailing = 20
} }
// TODO: Should these be symmetric? Should they reflect the other gutters? fullWidthGutterLeading = gutterLeading
fullWidthGutterLeading = 20 fullWidthGutterTrailing = gutterTrailing
fullWidthGutterTrailing = 20
contentWidth = viewWidth - (gutterLeading + gutterTrailing) contentWidth = viewWidth - (gutterLeading + gutterTrailing)
fullWidthContentWidth = viewWidth - (fullWidthGutterLeading + fullWidthGutterTrailing) fullWidthContentWidth = viewWidth - (fullWidthGutterLeading + fullWidthGutterTrailing)
maxMessageWidth = floor(contentWidth * 0.9) maxMessageWidth = floor(contentWidth - 48)
// TODO: Should this be different? // TODO: Should this be different?
maxFooterWidth = maxMessageWidth - 10 maxFooterWidth = maxMessageWidth - 10

Loading…
Cancel
Save