From 675f4ee89bf93ed42de82681d50d9babf1140bbe Mon Sep 17 00:00:00 2001 From: cdricms <36056008+cdricms@users.noreply.github.com> Date: Wed, 10 Jul 2024 11:49:48 +0200 Subject: [PATCH] Fixed padding on components --- Brewer/ContentView.swift | 21 ++++++++++++--------- Brewer/SearchView.swift | 2 -- 2 files changed, 12 insertions(+), 11 deletions(-) diff --git a/Brewer/ContentView.swift b/Brewer/ContentView.swift index f078d72..2a55b05 100644 --- a/Brewer/ContentView.swift +++ b/Brewer/ContentView.swift @@ -16,16 +16,19 @@ struct ContentView: View { @State private var segmentedSelection: SegementedSelection = .search var body: some View { NavigationStack { - Picker("", selection: $segmentedSelection) { - ForEach(SegementedSelection.allCases, id: \.self) { sel in - Text(sel.rawValue).tag(sel) + VStack { + Picker("", selection: $segmentedSelection) { + ForEach(SegementedSelection.allCases, id: \.self) { sel in + Text(sel.rawValue).tag(sel) + } + }.pickerStyle(.segmented) + .padding(.leading, -8) + switch segmentedSelection { + case .search: + SearchView() + case .installed: + InstalledView() } - }.pickerStyle(.segmented) - switch segmentedSelection { - case .search: - SearchView() - case .installed: - InstalledView() } } } diff --git a/Brewer/SearchView.swift b/Brewer/SearchView.swift index 16bbb6b..9a673a0 100644 --- a/Brewer/SearchView.swift +++ b/Brewer/SearchView.swift @@ -13,8 +13,6 @@ struct SearchView: View { var body: some View { VStack { TextField("Search", text: $query) - .padding() - .padding(.bottom, 0) .onSubmit { brew.getInfo(on: query) }