mirror of
https://github.com/Dimillian/IceCubesApp.git
synced 2024-12-26 06:54:32 +01:00
Co-authored-by: Yusuke Arakawa <nekolaboratory@users.noreply.github.com>
This commit is contained in:
parent
8f6e6853aa
commit
81ce93f446
@ -6,22 +6,22 @@ import SwiftUI
|
|||||||
|
|
||||||
struct DisplaySettingsView: View {
|
struct DisplaySettingsView: View {
|
||||||
typealias FontState = Theme.FontState
|
typealias FontState = Theme.FontState
|
||||||
|
|
||||||
@Environment(\.colorScheme) private var colorScheme
|
@Environment(\.colorScheme) private var colorScheme
|
||||||
@EnvironmentObject private var theme: Theme
|
@EnvironmentObject private var theme: Theme
|
||||||
@EnvironmentObject private var userPreferences: UserPreferences
|
@EnvironmentObject private var userPreferences: UserPreferences
|
||||||
|
|
||||||
@State private var isFontSelectorPresented = false
|
@State private var isFontSelectorPresented = false
|
||||||
|
|
||||||
private var previewStatusViewModel = StatusRowViewModel(status: Status.placeholder(parseMarkdown: true))
|
private var previewStatusViewModel = StatusRowViewModel(status: Status.placeholder(parseMarkdown: true))
|
||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
Form {
|
Form {
|
||||||
Section("settings.display.example-toot") {
|
Section("settings.display.example-toot") {
|
||||||
StatusRowView(viewModel: previewStatusViewModel)
|
StatusRowView(viewModel: previewStatusViewModel)
|
||||||
.allowsHitTesting(false)
|
.allowsHitTesting(false)
|
||||||
}
|
}
|
||||||
|
|
||||||
Section {
|
Section {
|
||||||
Toggle("settings.display.theme.systemColor", isOn: $theme.followSystemColorScheme)
|
Toggle("settings.display.theme.systemColor", isOn: $theme.followSystemColorScheme)
|
||||||
themeSelectorButton
|
themeSelectorButton
|
||||||
@ -104,7 +104,7 @@ struct DisplaySettingsView: View {
|
|||||||
Toggle("settings.display.show-ipad-column", isOn: $userPreferences.showiPadSecondaryColumn)
|
Toggle("settings.display.show-ipad-column", isOn: $userPreferences.showiPadSecondaryColumn)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
Section {
|
Section {
|
||||||
Button {
|
Button {
|
||||||
theme.followSystemColorScheme = true
|
theme.followSystemColorScheme = true
|
||||||
@ -122,7 +122,7 @@ struct DisplaySettingsView: View {
|
|||||||
.scrollContentBackground(.hidden)
|
.scrollContentBackground(.hidden)
|
||||||
.background(theme.secondaryBackgroundColor)
|
.background(theme.secondaryBackgroundColor)
|
||||||
}
|
}
|
||||||
|
|
||||||
private var themeSelectorButton: some View {
|
private var themeSelectorButton: some View {
|
||||||
NavigationLink(destination: ThemePreviewView()) {
|
NavigationLink(destination: ThemePreviewView()) {
|
||||||
HStack {
|
HStack {
|
||||||
|
Loading…
Reference in New Issue
Block a user