mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2024-11-25 01:31:04 +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 {
|
var contentLineLimit: Int {
|
||||||
switch family {
|
switch family {
|
||||||
case .systemSmall, .systemMedium:
|
case .systemSmall, .systemMedium:
|
||||||
return 4
|
return 5
|
||||||
default:
|
default:
|
||||||
return 2
|
return 2
|
||||||
}
|
}
|
||||||
|
@ -29,10 +29,8 @@ struct PostsWidgetView : View {
|
||||||
var body: some View {
|
var body: some View {
|
||||||
VStack(alignment: .leading, spacing: 8) {
|
VStack(alignment: .leading, spacing: 8) {
|
||||||
headerView
|
headerView
|
||||||
VStack(alignment: .leading, spacing: 16) {
|
ForEach(entry.statuses) { status in
|
||||||
ForEach(entry.statuses) { status in
|
makeStatusView(status)
|
||||||
makeStatusView(status)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
Spacer()
|
Spacer()
|
||||||
}
|
}
|
||||||
|
@ -57,7 +55,7 @@ struct PostsWidgetView : View {
|
||||||
VStack(alignment: .leading, spacing: 2) {
|
VStack(alignment: .leading, spacing: 2) {
|
||||||
makeStatusHeaderView(status)
|
makeStatusHeaderView(status)
|
||||||
Text(status.content.asSafeMarkdownAttributedString)
|
Text(status.content.asSafeMarkdownAttributedString)
|
||||||
.font(.body)
|
.font(.footnote)
|
||||||
.lineLimit(contentLineLimit)
|
.lineLimit(contentLineLimit)
|
||||||
.fixedSize(horizontal: false, vertical: true)
|
.fixedSize(horizontal: false, vertical: true)
|
||||||
.padding(.leading, 20)
|
.padding(.leading, 20)
|
||||||
|
@ -89,7 +87,7 @@ struct PostsWidgetView : View {
|
||||||
}
|
}
|
||||||
Spacer()
|
Spacer()
|
||||||
}
|
}
|
||||||
.font(.subheadline)
|
.font(.footnote)
|
||||||
.fontWeight(.semibold)
|
.fontWeight(.semibold)
|
||||||
.lineLimit(1)
|
.lineLimit(1)
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,8 +23,8 @@ func loadStatuses(for timeline: TimelineFilter,
|
||||||
statuses = statuses.prefix(upTo: 1).map{ $0 }
|
statuses = statuses.prefix(upTo: 1).map{ $0 }
|
||||||
}
|
}
|
||||||
case .systemLarge, .systemExtraLarge:
|
case .systemLarge, .systemExtraLarge:
|
||||||
if statuses.count >= 4 {
|
if statuses.count >= 5 {
|
||||||
statuses = statuses.prefix(upTo: 4).map{ $0 }
|
statuses = statuses.prefix(upTo: 5).map{ $0 }
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
break
|
break
|
||||||
|
|
Loading…
Reference in a new issue