Rich Text Composer: Enable bulleted & numbered lists support

This commit is contained in:
aringenbach
2023-01-05 15:56:04 +01:00
parent 033f28cdcb
commit 175baee5f6
7 changed files with 72 additions and 36 deletions
@@ -32,21 +32,23 @@ struct FormattingToolbar: View {
var formatAction: (FormatType) -> Void
var body: some View {
HStack(spacing: 4) {
ForEach(formatItems) { item in
Button {
formatAction(item.type)
} label: {
Image(item.icon)
.renderingMode(.template)
.foregroundColor(getForegroundColor(for: item))
ScrollView(.horizontal) {
HStack(spacing: 4) {
ForEach(formatItems) { item in
Button {
formatAction(item.type)
} label: {
Image(item.icon)
.renderingMode(.template)
.foregroundColor(getForegroundColor(for: item))
}
.disabled(item.state == .disabled)
.frame(width: 44, height: 44)
.background(getBackgroundColor(for: item))
.cornerRadius(8)
.accessibilityIdentifier(item.accessibilityIdentifier)
.accessibilityLabel(item.accessibilityLabel)
}
.disabled(item.state == .disabled)
.frame(width: 44, height: 44)
.background(getBackgroundColor(for: item))
.cornerRadius(8)
.accessibilityIdentifier(item.accessibilityIdentifier)
.accessibilityLabel(item.accessibilityLabel)
}
}
}