ios: tighten fonts / list styles
This commit is contained in:
@@ -18,7 +18,16 @@ struct MediaItem: Codable
|
|||||||
let metadata: Metadata?
|
let metadata: Metadata?
|
||||||
|
|
||||||
var displayTitle: String {
|
var displayTitle: String {
|
||||||
metadata?.title ?? title ?? filename ?? "item \(id)"
|
metadata?.title ?? title ?? displayFilename ?? "item \(id)"
|
||||||
|
}
|
||||||
|
|
||||||
|
private var displayFilename: String? {
|
||||||
|
guard let filename else { return nil }
|
||||||
|
if let url = URL(string: filename) {
|
||||||
|
return url.lastPathComponent
|
||||||
|
}
|
||||||
|
|
||||||
|
return filename
|
||||||
}
|
}
|
||||||
|
|
||||||
// MARK: - Types
|
// MARK: - Types
|
||||||
|
|||||||
@@ -41,16 +41,16 @@ struct NowPlayingView: View
|
|||||||
VStack {
|
VStack {
|
||||||
if let title = model.title {
|
if let title = model.title {
|
||||||
Text(title)
|
Text(title)
|
||||||
.font(.title2)
|
.font(.title3)
|
||||||
.lineLimit(1)
|
.lineLimit(1)
|
||||||
.bold()
|
.bold()
|
||||||
}
|
}
|
||||||
|
|
||||||
if let subtitle = model.subtitle {
|
if let subtitle = model.subtitle {
|
||||||
Text(subtitle)
|
Text(subtitle)
|
||||||
.font(.title3)
|
.font(.subheadline)
|
||||||
.foregroundStyle(.secondary)
|
.foregroundStyle(.secondary)
|
||||||
.lineLimit(1)
|
.lineLimit(2)
|
||||||
}
|
}
|
||||||
|
|
||||||
if nothingQueued {
|
if nothingQueued {
|
||||||
|
|||||||
@@ -150,10 +150,13 @@ struct MediaItemCell: View
|
|||||||
|
|
||||||
VStack(alignment: .leading) {
|
VStack(alignment: .leading) {
|
||||||
Text(title)
|
Text(title)
|
||||||
|
.bold()
|
||||||
|
.font(.subheadline)
|
||||||
.tint(.primary)
|
.tint(.primary)
|
||||||
.lineLimit(1)
|
.lineLimit(1)
|
||||||
|
|
||||||
Text(subtitle)
|
Text(subtitle)
|
||||||
|
.font(.caption)
|
||||||
.foregroundColor(.secondary)
|
.foregroundColor(.secondary)
|
||||||
.lineLimit(1)
|
.lineLimit(1)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user