mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2024-11-22 00:11:00 +00:00
Widget: Improve text size
This commit is contained in:
parent
7328c00006
commit
ee6f003073
2 changed files with 7 additions and 9 deletions
|
@ -21,7 +21,7 @@ struct PostsWidgetView : View {
|
|||
var contentLineLimit: Int {
|
||||
switch family {
|
||||
case .systemSmall, .systemMedium:
|
||||
return 4
|
||||
return 5
|
||||
default:
|
||||
return 2
|
||||
}
|
||||
|
@ -29,11 +29,9 @@ struct PostsWidgetView : View {
|
|||
var body: some View {
|
||||
VStack(alignment: .leading, spacing: 8) {
|
||||
headerView
|
||||
VStack(alignment: .leading, spacing: 16) {
|
||||
ForEach(entry.statuses) { status in
|
||||
makeStatusView(status)
|
||||
}
|
||||
}
|
||||
Spacer()
|
||||
}
|
||||
.frame(maxWidth: .infinity)
|
||||
|
@ -57,7 +55,7 @@ struct PostsWidgetView : View {
|
|||
VStack(alignment: .leading, spacing: 2) {
|
||||
makeStatusHeaderView(status)
|
||||
Text(status.content.asSafeMarkdownAttributedString)
|
||||
.font(.body)
|
||||
.font(.footnote)
|
||||
.lineLimit(contentLineLimit)
|
||||
.fixedSize(horizontal: false, vertical: true)
|
||||
.padding(.leading, 20)
|
||||
|
@ -89,7 +87,7 @@ struct PostsWidgetView : View {
|
|||
}
|
||||
Spacer()
|
||||
}
|
||||
.font(.subheadline)
|
||||
.font(.footnote)
|
||||
.fontWeight(.semibold)
|
||||
.lineLimit(1)
|
||||
}
|
||||
|
|
|
@ -23,8 +23,8 @@ func loadStatuses(for timeline: TimelineFilter,
|
|||
statuses = statuses.prefix(upTo: 1).map{ $0 }
|
||||
}
|
||||
case .systemLarge, .systemExtraLarge:
|
||||
if statuses.count >= 4 {
|
||||
statuses = statuses.prefix(upTo: 4).map{ $0 }
|
||||
if statuses.count >= 5 {
|
||||
statuses = statuses.prefix(upTo: 5).map{ $0 }
|
||||
}
|
||||
default:
|
||||
break
|
||||
|
|
Loading…
Reference in a new issue