Skip to content

Commit

Permalink
#34 Reduce min bubble width and make it a scaled metric
Browse files Browse the repository at this point in the history
  • Loading branch information
ismailgulek committed Jun 23, 2022
1 parent 9c6680d commit 25fb6ce
Showing 1 changed file with 2 additions and 1 deletion.
Expand Up @@ -19,6 +19,7 @@ struct TimelineItemStylerView<Header: View, Content: View>: View {
@ViewBuilder let content: () -> Content

@Environment(\.colorScheme) private var colorScheme
@ScaledMetric private var minBubbleWidth = 44

var body: some View {
VStack(alignment: timelineItem.isOutgoing ? .trailing : .leading, spacing: -5) {
Expand Down Expand Up @@ -60,7 +61,7 @@ struct TimelineItemStylerView<Header: View, Content: View>: View {
} else {
VStack(alignment: .trailing, spacing: 4) {
content()
.frame(minWidth: 64, alignment: .leading)
.frame(minWidth: minBubbleWidth, alignment: .leading)

Text(timelineItem.timestamp)
.foregroundColor(Color.element.tertiaryContent)
Expand Down

0 comments on commit 25fb6ce

Please sign in to comment.