Browse Source

Fixed font formatting

profile-edit
Sam DuBois 2 years ago
parent
commit
cb5593da06
  1. 2
      damus/Views/EventView.swift
  2. 4
      damus/Views/NoteContentView.swift
  3. 8
      damus/Views/ProfileName.swift

2
damus/Views/EventView.swift

@ -126,7 +126,7 @@ struct EventView: View {
HStack(alignment: .center) { HStack(alignment: .center) {
EventProfileName(pubkey: pubkey, profile: profile, contacts: damus.contacts, show_friend_confirmed: show_friend_icon) EventProfileName(pubkey: pubkey, profile: profile, contacts: damus.contacts, show_friend_confirmed: show_friend_icon)
Text("\(format_relative_time(event.created_at))") Text("\(format_relative_time(event.created_at))")
.font(.subheadline) .font(.body)
.foregroundColor(.gray) .foregroundColor(.gray)
} }

4
damus/Views/NoteContentView.swift

@ -64,10 +64,10 @@ struct NoteContentView: View {
return VStack(alignment: .leading) { return VStack(alignment: .leading) {
if let txt = try? AttributedString(markdown: artifacts.content, options: md_opts) { if let txt = try? AttributedString(markdown: artifacts.content, options: md_opts) {
Text(txt) Text(txt)
.font(.subheadline) .font(.body)
} else { } else {
Text(artifacts.content) Text(artifacts.content)
.font(.subheadline) .font(.body)
} }
if show_images && artifacts.images.count > 0 { if show_images && artifacts.images.count > 0 {
ImageCarousel(urls: artifacts.images) ImageCarousel(urls: artifacts.images)

8
damus/Views/ProfileName.swift

@ -75,7 +75,7 @@ struct ProfileName: View {
HStack { HStack {
Text(prefix + String(display_name ?? Profile.displayName(profile: profile, pubkey: pubkey))) Text(prefix + String(display_name ?? Profile.displayName(profile: profile, pubkey: pubkey)))
.font(.subheadline) .font(.body)
.fontWeight(prefix == "@" ? .none : .bold) .fontWeight(prefix == "@" ? .none : .bold)
if let frend = friend_icon { if let frend = friend_icon {
Label("", systemImage: frend) Label("", systemImage: frend)
@ -140,14 +140,14 @@ struct EventProfileName: View {
HStack { HStack {
if let real_name = profile?.display_name { if let real_name = profile?.display_name {
Text(real_name) Text(real_name)
.font(.subheadline.weight(.bold)) .font(.body.weight(.bold))
Text("@" + String(display_name ?? Profile.displayName(profile: profile, pubkey: pubkey))) Text("@" + String(display_name ?? Profile.displayName(profile: profile, pubkey: pubkey)))
.foregroundColor(.gray) .foregroundColor(.gray)
.font(.subheadline) .font(.body)
} else { } else {
Text(String(display_name ?? Profile.displayName(profile: profile, pubkey: pubkey))) Text(String(display_name ?? Profile.displayName(profile: profile, pubkey: pubkey)))
.font(.subheadline) .font(.body)
.fontWeight(.bold) .fontWeight(.bold)
} }

Loading…
Cancel
Save