Stop paperSurface() undoing the serif navigation titles
Only the bookmarks screen had picked up the serif title. Every other screen — Search, Sources, Podcasts, Settings, Ask, the sheets — was still system bold sans, and the reason was paperSurface(): setting .toolbarBackground makes SwiftUI build a fresh UINavigationBarAppearance and discard the one PaperAppearance installed, text attributes included. Bookmarks was the only screen not using the helper, which is why it alone looked right. The modifier no longer sets a toolbar background. It doesn't need one — the bar is transparent by appearance and the screen already paints the paper ground beneath it. Also labels the bookmarks toolbar buttons (Settings, Add bookmark, Unread filter, AI actions), which were bare SF Symbols announcing nothing to VoiceOver. Verified in both schemes: large titles on Bookmarks/Sources/Podcasts/ Search and inline titles on the Settings and Ask sheets all render serif, on paper grounds. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01JgLHztZGaEHvS3KNeGQmRM
This commit is contained in:
co-authored by
Claude Opus 5
parent
dd1c09a00c
commit
76df237473
@@ -122,6 +122,7 @@ struct BookmarksView: View {
|
|||||||
} label: {
|
} label: {
|
||||||
Image(systemName: "sparkles")
|
Image(systemName: "sparkles")
|
||||||
}
|
}
|
||||||
|
.accessibilityLabel("AI actions")
|
||||||
}
|
}
|
||||||
ToolbarItem(placement: .topBarTrailing) {
|
ToolbarItem(placement: .topBarTrailing) {
|
||||||
HStack(spacing: 16) {
|
HStack(spacing: 16) {
|
||||||
@@ -138,6 +139,7 @@ struct BookmarksView: View {
|
|||||||
Button { showAddBookmark = true } label: {
|
Button { showAddBookmark = true } label: {
|
||||||
Image(systemName: "plus")
|
Image(systemName: "plus")
|
||||||
}
|
}
|
||||||
|
.accessibilityLabel("Add bookmark")
|
||||||
Button {
|
Button {
|
||||||
Task { await viewModel.toggleUnreadFilter() }
|
Task { await viewModel.toggleUnreadFilter() }
|
||||||
} label: {
|
} label: {
|
||||||
@@ -146,9 +148,11 @@ struct BookmarksView: View {
|
|||||||
: "line.3.horizontal.decrease.circle")
|
: "line.3.horizontal.decrease.circle")
|
||||||
.contentTransition(.symbolEffect(.replace))
|
.contentTransition(.symbolEffect(.replace))
|
||||||
}
|
}
|
||||||
|
.accessibilityLabel("Unread filter")
|
||||||
Button { showSettings = true } label: {
|
Button { showSettings = true } label: {
|
||||||
Image(systemName: "gearshape")
|
Image(systemName: "gearshape")
|
||||||
}
|
}
|
||||||
|
.accessibilityLabel("Settings")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -131,13 +131,18 @@ enum PaperType {
|
|||||||
|
|
||||||
extension View {
|
extension View {
|
||||||
/// Puts a screen on the paper ground: clears the system list/scroll
|
/// Puts a screen on the paper ground: clears the system list/scroll
|
||||||
/// background so the sheet shows through, and tints the bar to match so a
|
/// background so the sheet shows through, and lets the paper reach past the
|
||||||
/// large title doesn't sit on a white strip above the content.
|
/// safe area so the bar sits on it.
|
||||||
|
///
|
||||||
|
/// Deliberately no `.toolbarBackground` — setting it makes SwiftUI build a
|
||||||
|
/// fresh UINavigationBarAppearance and throw away the one PaperAppearance
|
||||||
|
/// installed, which silently reverted these screens' titles to the system
|
||||||
|
/// bold sans. The bar is transparent by appearance, so the background
|
||||||
|
/// below is all it needs.
|
||||||
func paperSurface() -> some View {
|
func paperSurface() -> some View {
|
||||||
self
|
self
|
||||||
.scrollContentBackground(.hidden)
|
.scrollContentBackground(.hidden)
|
||||||
.background(Paper.sheet.ignoresSafeArea())
|
.background(Paper.sheet.ignoresSafeArea())
|
||||||
.toolbarBackground(Paper.sheet, for: .navigationBar)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Editable text. Monospaced, because in this design anything you type is
|
/// Editable text. Monospaced, because in this design anything you type is
|
||||||
|
|||||||
Reference in New Issue
Block a user