mirror of
https://github.com/omnivore-app/omnivore.git
synced 2026-03-11 08:54:26 +00:00
Add theme and justify-text to reader settings
This commit is contained in:
parent
bf799a6534
commit
94099281ae
3 changed files with 16 additions and 3 deletions
|
|
@ -164,7 +164,7 @@ public enum LocalText {
|
|||
public static let genericLoading = localText(key: "genericLoading")
|
||||
public static let genericFontFamily = localText(key: "genericFontFamily")
|
||||
public static let genericHighContrastText = localText(key: "genericHighContrastText")
|
||||
public static let enableHighlightOnReleaseText = localText(key: "enableHighlightOnReleaseText")
|
||||
public static let enableJustifyText = localText(key: "enableJustifyText")
|
||||
public static let genericFont = localText(key: "genericFont")
|
||||
public static let genericHighlight = localText(key: "genericHighlight")
|
||||
public static let labelsGeneric = localText(key: "labelsGeneric")
|
||||
|
|
|
|||
|
|
@ -163,7 +163,8 @@
|
|||
"genericLoading" = "Loading...";
|
||||
"genericFontFamily" = "Font Family";
|
||||
"genericHighContrastText" = "High Contrast Text";
|
||||
"enableHighlightOnReleaseText" = "Auto Highlight Mode:";
|
||||
"enableHighlightOnReleaseText" = "Auto Highlight Mode";
|
||||
"enableJustifyText" = "Justify Text";
|
||||
"genericFont" = "Font";
|
||||
"genericHighlight" = "Highlight";
|
||||
"labelsGeneric" = "Labels";
|
||||
|
|
|
|||
|
|
@ -17,6 +17,9 @@ struct MainApp: App {
|
|||
@NSApplicationDelegateAdaptor(AppDelegate.self) var appDelegate
|
||||
@AppStorage(UserDefaultKey.preferredWebFont.rawValue) var preferredFont = WebFont.inter.rawValue
|
||||
@AppStorage(UserDefaultKey.prefersHighContrastWebFont.rawValue) var prefersHighContrastText = true
|
||||
@AppStorage(UserDefaultKey.justifyText.rawValue) var justifyText = false
|
||||
@AppStorage(UserDefaultKey.themeName.rawValue) var currentThemeName = "System"
|
||||
|
||||
#elseif os(iOS)
|
||||
@UIApplicationDelegateAdaptor(AppDelegate.self) var appDelegate
|
||||
#endif
|
||||
|
|
@ -39,7 +42,9 @@ struct MainApp: App {
|
|||
.commands {
|
||||
MacMenuCommands(
|
||||
preferredFont: $preferredFont,
|
||||
prefersHighContrastText: $prefersHighContrastText
|
||||
prefersHighContrastText: $prefersHighContrastText,
|
||||
justifyText: $justifyText,
|
||||
currentThemeName: $currentThemeName
|
||||
)
|
||||
}
|
||||
.onChange(of: preferredFont) { _ in
|
||||
|
|
@ -48,6 +53,13 @@ struct MainApp: App {
|
|||
.onChange(of: prefersHighContrastText) { _ in
|
||||
NSNotification.readerSettingsChanged()
|
||||
}
|
||||
.onChange(of: justifyText) { _ in
|
||||
NSNotification.readerSettingsChanged()
|
||||
}
|
||||
.onChange(of: currentThemeName) { _ in
|
||||
NSNotification.readerSettingsChanged()
|
||||
}
|
||||
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue