Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 9 additions & 16 deletions Sources/Fluid/UI/SettingsView.swift
Original file line number Diff line number Diff line change
Expand Up @@ -828,9 +828,9 @@ struct SettingsView: View {
Text(self.hotkeyMode.description)
.font(self.theme.typography.bodySmall)
.foregroundStyle(self.settingsSecondaryText)
.fixedSize(horizontal: false, vertical: true)
}

Spacer()
.frame(maxWidth: .infinity, alignment: .leading)

Picker("", selection: self.$hotkeyMode) {
ForEach(HotkeyActivationMode.allCases) { mode in
Expand Down Expand Up @@ -864,9 +864,9 @@ struct SettingsView: View {
Text(SettingsStore.shared.textInsertionMode.description)
.font(self.theme.typography.bodySmall)
.foregroundStyle(self.settingsSecondaryText)
.fixedSize(horizontal: false, vertical: true)
}

Spacer()
.frame(maxWidth: .infinity, alignment: .leading)

Picker("", selection: Binding(
get: { SettingsStore.shared.textInsertionMode },
Expand Down Expand Up @@ -964,8 +964,7 @@ struct SettingsView: View {
isOn: Binding(
get: { SettingsStore.shared.literalDictationFormattingEnabled },
set: { SettingsStore.shared.literalDictationFormattingEnabled = $0 }
),
allowsDescriptionWrapping: true
)
)
Divider().opacity(0.2)

Expand Down Expand Up @@ -995,8 +994,7 @@ struct SettingsView: View {
isOn: Binding(
get: { SettingsStore.shared.skipSilentRecordingsEnabled },
set: { SettingsStore.shared.skipSilentRecordingsEnabled = $0 }
),
allowsDescriptionWrapping: true
)
)
Divider().opacity(0.2)

Expand Down Expand Up @@ -1961,8 +1959,7 @@ struct SettingsView: View {
private func optionToggleRow(
title: String,
description: String,
isOn: Binding<Bool>,
allowsDescriptionWrapping: Bool = false
isOn: Binding<Bool>
) -> some View {
HStack(alignment: .center) {
VStack(alignment: .leading, spacing: 2) {
Expand All @@ -1972,13 +1969,9 @@ struct SettingsView: View {
Text(description)
.font(self.theme.typography.bodySmall)
.foregroundStyle(self.settingsSecondaryText)
.fixedSize(horizontal: false, vertical: allowsDescriptionWrapping)
}
.frame(maxWidth: allowsDescriptionWrapping ? .infinity : nil, alignment: .leading)

if !allowsDescriptionWrapping {
Spacer()
.fixedSize(horizontal: false, vertical: true)
}
.frame(maxWidth: .infinity, alignment: .leading)

Toggle("", isOn: isOn)
.toggleStyle(.switch)
Expand Down
Loading