diff options
| author | Ruben Beltran del Rio <git@r.bdr.sh> | 2025-07-11 14:55:46 +0200 |
|---|---|---|
| committer | Ruben Beltran del Rio <git@r.bdr.sh> | 2025-07-11 14:55:46 +0200 |
| commit | 49766f0c78015831f8be57349317f0d1c8228327 (patch) | |
| tree | 47ceb138008134dc83ad8432c744e3174854cb2c /Map/Presentation/Preferences/GeneralPreferencesView.swift | |
| parent | f8c877e01e6517b13ec085d9d79bf316c7637344 (diff) | |
Add QuickLook settings
Diffstat (limited to 'Map/Presentation/Preferences/GeneralPreferencesView.swift')
| -rw-r--r-- | Map/Presentation/Preferences/GeneralPreferencesView.swift | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/Map/Presentation/Preferences/GeneralPreferencesView.swift b/Map/Presentation/Preferences/GeneralPreferencesView.swift index a70d608..b5b781d 100644 --- a/Map/Presentation/Preferences/GeneralPreferencesView.swift +++ b/Map/Presentation/Preferences/GeneralPreferencesView.swift @@ -25,8 +25,38 @@ struct GeneralPreferencesView: View { @State private var showingExportFailedAlert = false @State private var exportShouldReset = false + @AppStorage("quickLookPreviewStyle", store: UserDefaults(suiteName: "group.systems.tranquil.Map")) + private var quickLookPreviewStyle: String = UserPreferences.Defaults.quickLookPreviewStyle + var body: some View { VStack(alignment: .center, spacing: Dimensions.Spacing.loose) { + // QuickLook section + HStack(alignment: .firstTextBaseline, spacing: Dimensions.Spacing.regular) { + Text("preferences.quick_look.title") + .font(.Theme.Body.emphasized) + .frame(maxWidth: 250, alignment: .trailing) + + VStack(alignment: .leading, spacing: Dimensions.Spacing.regular) { + + Text("preferences.quick_look.preview_style.title") + .font(.Theme.Body.regular) + + Picker("", selection: $quickLookPreviewStyle) { + ForEach(QuickLookPreviewStyle.allCases, id: \.rawValue) { style in + Text(style.localizedName) + .tag(style.rawValue) + } + } + .pickerStyle(.menu) + .frame(maxWidth: 250) + .padding(.leading, -Dimensions.Spacing.regular) + + } + .frame(maxWidth: .infinity, alignment: .leading) + } + + Divider() + HStack(alignment: .firstTextBaseline, spacing: Dimensions.Spacing.regular) { Text("preferences.general.preferences.title") .font(.Theme.Body.emphasized) |