mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2025-02-22 20:46:21 +00:00
Fix #1859
This commit is contained in:
parent
6d12f2528d
commit
27da37e9ec
2 changed files with 17 additions and 15 deletions
|
@ -255,21 +255,7 @@ struct DisplaySettingsView: View {
|
||||||
private var resetSection: some View {
|
private var resetSection: some View {
|
||||||
Section {
|
Section {
|
||||||
Button {
|
Button {
|
||||||
theme.followSystemColorScheme = true
|
theme.restoreDefault()
|
||||||
theme.applySet(set: colorScheme == .dark ? .iceCubeDark : .iceCubeLight)
|
|
||||||
theme.avatarShape = .circle
|
|
||||||
theme.avatarPosition = .leading
|
|
||||||
theme.statusActionsDisplay = .full
|
|
||||||
theme.displayFullUsername = false
|
|
||||||
theme.statusDisplayStyle = .large
|
|
||||||
theme.lineSpacing = 1.2
|
|
||||||
theme.fontSizeScale = 1.0
|
|
||||||
|
|
||||||
localValues.tintColor = theme.tintColor
|
|
||||||
localValues.primaryBackgroundColor = theme.primaryBackgroundColor
|
|
||||||
localValues.secondaryBackgroundColor = theme.secondaryBackgroundColor
|
|
||||||
localValues.labelColor = theme.labelColor
|
|
||||||
|
|
||||||
} label: {
|
} label: {
|
||||||
Text("settings.display.restore")
|
Text("settings.display.restore")
|
||||||
}
|
}
|
||||||
|
|
|
@ -258,6 +258,22 @@ import SwiftUI
|
||||||
|
|
||||||
public static let shared = Theme()
|
public static let shared = Theme()
|
||||||
|
|
||||||
|
public func restoreDefault() {
|
||||||
|
applySet(set: themeStorage.selectedScheme == .dark ? .iceCubeDark : .iceCubeLight)
|
||||||
|
isThemePreviouslySet = true
|
||||||
|
avatarPosition = .leading
|
||||||
|
avatarShape = .circle
|
||||||
|
storedSet = selectedSet
|
||||||
|
statusActionsDisplay = .full
|
||||||
|
statusDisplayStyle = .large
|
||||||
|
followSystemColorScheme = true
|
||||||
|
displayFullUsername = false
|
||||||
|
lineSpacing = 1.2
|
||||||
|
fontSizeScale = 1
|
||||||
|
chosenFontData = nil
|
||||||
|
statusActionSecondary = .share
|
||||||
|
}
|
||||||
|
|
||||||
private init() {
|
private init() {
|
||||||
isThemePreviouslySet = themeStorage.isThemePreviouslySet
|
isThemePreviouslySet = themeStorage.isThemePreviouslySet
|
||||||
selectedScheme = themeStorage.selectedScheme
|
selectedScheme = themeStorage.selectedScheme
|
||||||
|
|
Loading…
Reference in a new issue