fix StatusRowCardView layout (#1901)

This commit is contained in:
Thai D. V 2024-01-19 15:01:40 +07:00 committed by GitHub
parent 709dd79e25
commit f79117eff1
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -64,9 +64,9 @@ public struct StatusRowCardView: View {
#else #else
.background(theme.secondaryBackgroundColor) .background(theme.secondaryBackgroundColor)
#endif #endif
.cornerRadius(16) .cornerRadius(10)
.overlay( .overlay(
RoundedRectangle(cornerRadius: 16) RoundedRectangle(cornerRadius: 10)
.stroke(.gray.opacity(0.35), lineWidth: 1) .stroke(.gray.opacity(0.35), lineWidth: 1)
) )
.contextMenu { .contextMenu {
@ -113,13 +113,13 @@ public struct StatusRowCardView: View {
.accessibilityHidden(true) .accessibilityHidden(true)
.frame(height: imageHeight) .frame(height: imageHeight)
} }
VStack(alignment: .leading, spacing: 6) { VStack(alignment: .leading, spacing: 4) {
Text(title) Text(title)
.font(.scaledHeadline) .font(.scaledHeadline)
.lineLimit(3) .lineLimit(1)
if let description = card.description, !description.isEmpty { if let description = card.description, !description.isEmpty {
Text(description) Text(description)
.font(.scaledBody) .font(.scaledFootnote)
.foregroundStyle(.secondary) .foregroundStyle(.secondary)
.lineLimit(3) .lineLimit(3)
} }
@ -129,7 +129,8 @@ public struct StatusRowCardView: View {
.lineLimit(1) .lineLimit(1)
} }
.frame(maxWidth: .infinity, alignment: .leading) .frame(maxWidth: .infinity, alignment: .leading)
.padding(16) .padding(.horizontal, 10)
.padding(.bottom, 10)
} }
private func iconLinkPreview(_ title: String, _ url: URL) -> some View { private func iconLinkPreview(_ title: String, _ url: URL) -> some View {