diff --git a/apple/OmnivoreKit/Sources/App/Views/LinkItemDetailView.swift b/apple/OmnivoreKit/Sources/App/Views/LinkItemDetailView.swift index 780a62eb3..521c82c5d 100644 --- a/apple/OmnivoreKit/Sources/App/Views/LinkItemDetailView.swift +++ b/apple/OmnivoreKit/Sources/App/Views/LinkItemDetailView.swift @@ -192,6 +192,9 @@ struct LinkItemDetailView: View { .frame(height: readerViewNavBarHeight * navBarVisibilityRatio) .opacity(navBarVisibilityRatio) .background(Color.systemBackground) + .onTapGesture { + showFontSizePopover = false + } } #if os(iOS) @@ -217,7 +220,7 @@ struct LinkItemDetailView: View { fontAdjustmentPopoverView .background(Color.appButtonBackground) .cornerRadius(8) - .padding(.trailing, 5) + .padding(.trailing, 44) } Spacer() } diff --git a/apple/OmnivoreKit/Sources/Views/Article/WebAppViewCoordinator.swift b/apple/OmnivoreKit/Sources/Views/Article/WebAppViewCoordinator.swift index 09305f8c3..430d17591 100644 --- a/apple/OmnivoreKit/Sources/Views/Article/WebAppViewCoordinator.swift +++ b/apple/OmnivoreKit/Sources/Views/Article/WebAppViewCoordinator.swift @@ -44,8 +44,10 @@ extension WebAppViewCoordinator: WKNavigationDelegate { } func webView(_ webView: WKWebView, didFinish _: WKNavigation!) { - webView.isOpaque = true - webView.backgroundColor = .systemBackground + #if os(iOS) + webView.isOpaque = true + webView.backgroundColor = .systemBackground + #endif } } diff --git a/apple/OmnivoreKit/Sources/Views/Colors/Colors.swift b/apple/OmnivoreKit/Sources/Views/Colors/Colors.swift index e3270b61c..03c20e65d 100644 --- a/apple/OmnivoreKit/Sources/Views/Colors/Colors.swift +++ b/apple/OmnivoreKit/Sources/Views/Colors/Colors.swift @@ -22,9 +22,18 @@ public extension Color { static var systemBackground: Color { Color(.systemBackground) } static var systemPlaceholder: Color { Color(.placeholderText) } static var secondarySystemGroupedBackground: Color { Color(.secondarySystemGroupedBackground) } + static var systemLabel: Color { + if #available(iOS 15.0, *) { + return Color(uiColor: .label) + } else { + return Color.appGrayTextContrast + } + } + #elseif os(macOS) static var systemBackground: Color { Color(.windowBackgroundColor) } static var systemPlaceholder: Color { Color(.placeholderTextColor) } + static var systemLabel: Color { Color(.labelColor) } // Just for compilation. secondarySystemGroupedBackground shouldn't be used on macOS static var secondarySystemGroupedBackground: Color { Color(.windowBackgroundColor) } diff --git a/apple/OmnivoreKit/Sources/Views/FontSizeAdjustmentPopoverView.swift b/apple/OmnivoreKit/Sources/Views/FontSizeAdjustmentPopoverView.swift index 76ec5520e..11f5131d5 100644 --- a/apple/OmnivoreKit/Sources/Views/FontSizeAdjustmentPopoverView.swift +++ b/apple/OmnivoreKit/Sources/Views/FontSizeAdjustmentPopoverView.swift @@ -30,13 +30,15 @@ public struct FontSizeAdjustmentPopoverView: View { label: { Image(systemName: "minus") #if os(iOS) - .foregroundColor(.appGraySolid) + .foregroundColor(.systemLabel) .padding() #endif } ) .frame(width: 55, height: 40, alignment: .center) - Divider().frame(height: 30) + Divider() + .frame(height: 30) + .background(Color.systemLabel) Button( action: { storedFontSize = min(storedFontSize + 2, 28) @@ -45,7 +47,7 @@ public struct FontSizeAdjustmentPopoverView: View { label: { Image(systemName: "plus") #if os(iOS) - .foregroundColor(.appGraySolid) + .foregroundColor(.systemLabel) .padding() #endif }