Fix layout of ActionCommandView

This commit is contained in:
1024jp 2024-06-18 22:29:45 +09:00
parent e5f00977f0
commit e0d03c96fd
2 changed files with 15 additions and 11 deletions

View File

@ -3,6 +3,10 @@
4.8.7 (unreleased)
--------------------------
### Fixes
- Fix the view layout in the Quick Action bar.
4.8.6 (655)

View File

@ -190,7 +190,17 @@ private struct ActionCommandView: View {
var body: some View {
Label {
HStack {
Image(systemName: self.command.kind.systemImage)
.resizable()
.aspectRatio(contentMode: .fit)
.font(.system(size: 23))
.fontWeight(.light)
.foregroundStyle(self.isSelected ? .primary : .secondary)
.frame(width: 26, height: 22, alignment: .center)
.accessibilityLabel(self.command.kind.label)
.padding(.horizontal, 4)
VStack(alignment: .leading) {
HStack(alignment: .firstTextBaseline, spacing: 4) {
ForEach(Array(self.matches.enumerated()), id: \.offset) { (offset, match) in
@ -228,16 +238,6 @@ private struct ActionCommandView: View {
.foregroundStyle(self.isSelected ? .primary : .secondary)
.layoutPriority(100)
}
} icon: {
Image(systemName: self.command.kind.systemImage)
.resizable()
.aspectRatio(contentMode: .fit)
.font(.system(size: 23))
.fontWeight(.light)
.foregroundStyle(self.isSelected ? .primary : .secondary)
.frame(width: 26, height: 22, alignment: .center)
.accessibilityLabel(self.command.kind.label)
.padding(.horizontal, 4)
}
.lineLimit(1)
.padding(.vertical, 4)