Revert some theme stuff

This commit is contained in:
Jackson Harper
2022-11-01 18:17:48 +08:00
parent e9ed8e6138
commit 70cf8eb87b
3 changed files with 4 additions and 6 deletions

View File

@ -240,8 +240,7 @@ struct WebReaderContainerView: View {
}
.frame(height: readerViewNavBarHeight * navBarVisibilityRatio)
.opacity(navBarVisibilityRatio)
.background(Color.black)
.background(Theme.fromName(themeName: ThemeManager.currentThemeName)?.bgColor ?? .clear)
.background(Color.systemBackground)
.alert("Are you sure?", isPresented: $showDeleteConfirmation) {
Button("Remove Link", role: .destructive) {
Snackbar.show(message: "Link removed")
@ -303,7 +302,6 @@ struct WebReaderContainerView: View {
showBottomBar: $showBottomBar,
showHighlightAnnotationModal: $showHighlightAnnotationModal
)
.background(Theme.fromName(themeName: ThemeManager.currentThemeName)?.bgColor ?? .clear)
.onTapGesture {
withAnimation {
navBarVisibilityRatio = 1

View File

@ -16,7 +16,7 @@ struct WebReaderContent {
init(
item: LinkedItem,
articleContent: ArticleContent,
isDark _: Bool,
isDark: Bool,
fontSize: Int,
lineHeight: Int,
maxWidthPercentage: Int,
@ -27,7 +27,7 @@ struct WebReaderContent {
self.lineHeight = lineHeight
self.maxWidthPercentage = maxWidthPercentage
self.item = item
self.themeKey = ThemeManager.currentThemeName // isDark ? "Gray" : "Charcoal"
self.themeKey = isDark ? "Gray" : "LightGray"
self.fontFamily = fontFamily
self.articleContent = articleContent
self.prefersHighContrastText = prefersHighContrastText

View File

@ -74,7 +74,7 @@ extension WebReaderCoordinator: WKNavigationDelegate {
func webView(_ webView: WKWebView, didFinish _: WKNavigation!) {
#if os(iOS)
webView.isOpaque = true
webView.backgroundColor = .clear
webView.backgroundColor = .systemBackground
#endif
}