Use dynamic type in the library

This commit is contained in:
Jackson Harper 2023-07-24 15:21:46 +08:00
parent ea51acd1a4
commit 6b7e0820d9

View file

@ -126,22 +126,22 @@ public struct LibraryItemCard: View {
AnyView(HStack {
let fgcolor = Color.isDarkMode ? Color.themeDarkWhiteGray : Color.themeMiddleGray
Text("\(estimatedReadingTime)")
.font(Font.system(size: 11, weight: .medium))
.font(.caption2).fontWeight(.medium)
.foregroundColor(fgcolor)
+
Text("\(readingProgress)")
.font(Font.system(size: 11, weight: .medium))
.font(.caption2).fontWeight(.medium)
.foregroundColor(isPartiallyRead ? Color.appGreenSuccess : fgcolor)
+
Text("\(highlightsText)")
.font(Font.system(size: 11, weight: .medium))
.font(.caption2).fontWeight(.medium)
.foregroundColor(fgcolor)
+
Text("\(notesText)")
.font(Font.system(size: 11, weight: .medium))
.font(.caption2).fontWeight(.medium)
.foregroundColor(fgcolor)
}
.frame(maxWidth: .infinity, alignment: .leading))
@ -183,7 +183,7 @@ public struct LibraryItemCard: View {
var byLine: some View {
Text(bylineStr)
.font(Font.system(size: 11, weight: .regular))
.font(.caption2)
.foregroundColor(Color.isDarkMode ? Color.themeLightGray : Color.themeLightestGray)
.frame(maxWidth: .infinity, alignment: .leading)
.lineLimit(1)
@ -194,7 +194,7 @@ public struct LibraryItemCard: View {
readInfo
Text(item.unwrappedTitle)
.font(Font.system(size: 14, weight: .semibold))
.font(.body).fontWeight(.semibold)
.lineSpacing(1.25)
.foregroundColor(.appGrayTextContrast)
.fixedSize(horizontal: false, vertical: true)