Improved File and Audio timeline layout (#2176)

This commit is contained in:
Mauro 2023-11-27 17:18:40 +01:00 committed by GitHub
parent aacb24bcf8
commit 36224a3daa
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 31 additions and 30 deletions

View File

@ -22,15 +22,15 @@ struct AudioRoomTimelineView: View {
var body: some View {
TimelineStyler(timelineItem: timelineItem) {
HStack(spacing: 8) {
Image(systemName: "waveform")
.foregroundColor(.compound.iconPrimary)
FormattedBodyText(text: timelineItem.content.body)
}
.padding(.vertical, 12)
.padding(.horizontal, 6)
.accessibilityElement(children: .ignore)
.accessibilityLabel(L10n.commonAudio)
Label(title: { Text(timelineItem.body) },
icon: { Image(systemName: "waveform")
.foregroundColor(.compound.iconPrimary)
})
.labelStyle(RoomTimelineViewLabelStyle())
.font(.compound.bodyLG)
.padding(.vertical, 12)
.padding(.horizontal, 6)
.accessibilityLabel(L10n.commonAudio)
}
}
}

View File

@ -22,15 +22,15 @@ struct FileRoomTimelineView: View {
var body: some View {
TimelineStyler(timelineItem: timelineItem) {
HStack(spacing: 8) {
Image(systemName: "doc.text.fill")
.foregroundColor(.compound.iconPrimary)
FormattedBodyText(text: timelineItem.content.body)
}
.padding(.vertical, 12)
.padding(.horizontal, 6)
.accessibilityElement(children: .ignore)
.accessibilityLabel(L10n.commonFile)
Label(title: { Text(timelineItem.body) },
icon: { Image(systemName: "doc.text.fill")
.foregroundColor(.compound.iconPrimary)
})
.labelStyle(RoomTimelineViewLabelStyle())
.font(.compound.bodyLG)
.padding(.vertical, 12)
.padding(.horizontal, 6)
.accessibilityLabel(L10n.commonFile)
}
}
}

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

1
changelog.d/1810.bugfix Normal file
View File

@ -0,0 +1 @@
Improved the wrapping of the text for File and Audio timeline items.