mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
Merge pull request #2160 from omnivore-app/fix/ios-theme-caret-color
Set the iOS caret colour based on theme
This commit is contained in:
commit
9ce5b0fa6f
6 changed files with 26 additions and 5 deletions
|
|
@ -1490,7 +1490,7 @@
|
|||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
MARKETING_VERSION = 1.26.0;
|
||||
MARKETING_VERSION = 1.27.0;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = app.omnivore.app;
|
||||
PRODUCT_NAME = Omnivore;
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
|
|
@ -1831,7 +1831,7 @@
|
|||
"$(inherited)",
|
||||
"@executable_path/Frameworks",
|
||||
);
|
||||
MARKETING_VERSION = 1.26.0;
|
||||
MARKETING_VERSION = 1.27.0;
|
||||
PRODUCT_BUNDLE_IDENTIFIER = app.omnivore.app;
|
||||
PRODUCT_NAME = Omnivore;
|
||||
PROVISIONING_PROFILE_SPECIFIER = "";
|
||||
|
|
|
|||
|
|
@ -371,7 +371,7 @@ public struct ShareExtensionView: View {
|
|||
viewModel.submitTitleEdit(dataService: viewModel.services.dataService,
|
||||
itemID: linkedItem.unwrappedID,
|
||||
title: viewModel.title,
|
||||
description: linkedItem.description)
|
||||
description: linkedItem.descriptionText ?? "")
|
||||
}
|
||||
}
|
||||
viewState = .mainView
|
||||
|
|
|
|||
|
|
@ -55,6 +55,7 @@ struct WebReader: PlatformViewRepresentable {
|
|||
|
||||
#if os(iOS)
|
||||
webView.isOpaque = false
|
||||
webView.tintColor = UIColor(ThemeManager.currentHighlightColor)
|
||||
webView.backgroundColor = UIColor(ThemeManager.currentBgColor)
|
||||
webView.underPageBackgroundColor = UIColor(ThemeManager.currentBgColor)
|
||||
webView.scrollView.backgroundColor = UIColor(ThemeManager.currentBgColor)
|
||||
|
|
@ -116,6 +117,7 @@ struct WebReader: PlatformViewRepresentable {
|
|||
(webView as? OmnivoreWebView)?.updateJustifyText()
|
||||
|
||||
webView.backgroundColor = UIColor(ThemeManager.currentBgColor)
|
||||
webView.tintColor = UIColor(ThemeManager.currentHighlightColor)
|
||||
webView.underPageBackgroundColor = UIColor(ThemeManager.currentBgColor)
|
||||
webView.scrollView.backgroundColor = UIColor(ThemeManager.currentBgColor)
|
||||
webView.scrollView.indicatorStyle = ThemeManager.currentTheme.isDark ?
|
||||
|
|
|
|||
|
|
@ -143,8 +143,9 @@ extension WebReaderCoordinator: WKNavigationDelegate {
|
|||
|
||||
func scrollViewShouldScrollToTop(_ scrollView: UIScrollView) -> Bool {
|
||||
scrollView.contentInset.top = readerViewNavBarHeight
|
||||
let navBarVisible = navBarVisibilityRatio == 1
|
||||
navBarVisibilityRatio = 1
|
||||
return false
|
||||
return navBarVisible
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -124,7 +124,7 @@
|
|||
"welcomeSignupAgreement" = "Al registrarte, aceptas de Omnivore:\n";
|
||||
"welcomeTitleTermsOfService" = "Términos del Servicio";
|
||||
"welcomeTitleAndJoiner" = " y ";
|
||||
"welcomeTitleEmailContinue" = "Continuar con el correo electrónico;
|
||||
"welcomeTitleEmailContinue" = "Continuar con el correo electrónico";
|
||||
|
||||
// Keyboard Commands
|
||||
"keyboardCommandDecreaseFont" = "Disminuir tamaño de fuente";
|
||||
|
|
|
|||
|
|
@ -31,6 +31,20 @@ public enum Theme: String, CaseIterable {
|
|||
}
|
||||
}
|
||||
|
||||
public var highlightColor: Color {
|
||||
switch self {
|
||||
case .light, .sepia:
|
||||
return Color(red: 255 / 255.0, green: 210 / 255.0, blue: 52 / 255.0)
|
||||
case .dark, .apollo:
|
||||
return Color(red: 134 / 255.0, green: 109 / 255.0, blue: 21 / 255.0)
|
||||
case .system:
|
||||
if Color.isDarkMode {
|
||||
return Color(red: 134 / 255.0, green: 109 / 255.0, blue: 21 / 255.0)
|
||||
}
|
||||
return Color(red: 255 / 255.0, green: 210 / 255.0, blue: 52 / 255.0)
|
||||
}
|
||||
}
|
||||
|
||||
public var keyColor: Color {
|
||||
switch self {
|
||||
case .light:
|
||||
|
|
@ -79,4 +93,8 @@ public enum ThemeManager {
|
|||
public static var currentBgColor: Color {
|
||||
currentTheme.bgColor
|
||||
}
|
||||
|
||||
public static var currentHighlightColor: Color {
|
||||
currentTheme.highlightColor
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue