mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
update styling and position of font size popover
This commit is contained in:
parent
89b7fe2bee
commit
e5a3fdc2d3
4 changed files with 22 additions and 6 deletions
|
|
@ -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()
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -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) }
|
||||
|
|
|
|||
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue