Make the continue reading cards a little smaller

This commit is contained in:
Jackson Harper
2023-06-13 20:13:14 +08:00
parent 4cb14475d0
commit 1505d11e85
2 changed files with 9 additions and 14 deletions

View File

@ -410,13 +410,9 @@ struct AnimatingCellHeight: AnimatableModifier {
ScrollView(.horizontal, showsIndicators: false) {
if viewModel.featureItems.count > 0 {
LazyHStack(alignment: .top, spacing: 20) {
LazyHStack(alignment: .top, spacing: 10) {
ForEach(viewModel.featureItems) { item in
LibraryFeatureCardNavigationLink(item: item, viewModel: viewModel)
.background(
RoundedRectangle(cornerRadius: 12) // << tune as needed
.fill(Color(UIColor.systemBackground)) // << fill with system color
)
}
}
} else {
@ -432,7 +428,6 @@ struct AnimatingCellHeight: AnimatableModifier {
Text((LinkedItemFilter(rawValue: viewModel.appliedFilter)?.displayName ?? "Inbox").uppercased())
.font(Font.system(size: 14, weight: .regular))
.padding(.bottom, 5)
}
}

View File

@ -76,19 +76,19 @@ public struct LibraryFeatureCard: View {
switch phase {
case .empty:
Color.systemBackground
.frame(width: 150, height: 90)
.cornerRadius(8)
.frame(width: 146, height: 82)
.cornerRadius(5)
case let .success(image):
image.resizable()
.aspectRatio(contentMode: .fill)
.frame(width: 150, height: 90)
.cornerRadius(8)
.frame(width: 146, height: 82)
.cornerRadius(5)
case .failure:
Image(systemName: "photo")
.frame(width: 150, height: 90)
.frame(width: 146, height: 82)
.foregroundColor(Color(hex: "#6A6968"))
.background(Color(hex: "#EBEBEB"))
.cornerRadius(8)
.cornerRadius(5)
@unknown default:
// Since the AsyncImagePhase enum isn't frozen,
// we need to add this currently unused fallback
@ -99,10 +99,10 @@ public struct LibraryFeatureCard: View {
}
} else {
Image(systemName: "photo")
.frame(width: 150, height: 90)
.frame(width: 146, height: 82)
.foregroundColor(Color(hex: "#6A6968"))
.background(Color(hex: "#EBEBEB"))
.cornerRadius(8)
.cornerRadius(5)
}
}
}