Removed unnecessary indentation from #716 (#730)

Co-authored-by: Yusuke Arakawa <nekolaboratory@users.noreply.github.com>
This commit is contained in:
Yusuke Arakawa 2023-02-09 14:22:34 +09:00 committed by GitHub
parent 8f6e6853aa
commit 81ce93f446
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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 {