From 7be92ee8afce415eae656839c47a5ecc13b849aa Mon Sep 17 00:00:00 2001 From: Kenta Kubo <601636+kkk669@users.noreply.github.com> Date: Tue, 25 Apr 2023 02:37:12 +0900 Subject: [PATCH] Change alignment of TextFields from trailing to leading --- DNSecure/Views/DetailView.swift | 16 +++------- DNSecure/Views/DoHSections.swift | 51 ++++++++++---------------------- DNSecure/Views/DoTSections.swift | 48 ++++++++++-------------------- DNSecure/Views/RuleView.swift | 25 +++++++--------- 4 files changed, 46 insertions(+), 94 deletions(-) diff --git a/DNSecure/Views/DetailView.swift b/DNSecure/Views/DetailView.swift index 588adec..f9f37ea 100644 --- a/DNSecure/Views/DetailView.swift +++ b/DNSecure/Views/DetailView.swift @@ -35,12 +35,8 @@ extension DetailView: View { Section { Toggle("Use This Server", isOn: self.$isOn) } - Section { - HStack { - Text("Name") - TextField("Name", text: self.$server.name) - .multilineTextAlignment(.trailing) - } + Section("Name") { + TextField("Name", text: self.$server.name) } self.serverConfigurationSections Section { @@ -76,12 +72,8 @@ extension DetailView: View { Section { Toggle("Use This Server", isOn: self.$isOn) } - Section { - HStack { - Text("Name") - TextField("Name", text: self.$server.name) - .multilineTextAlignment(.trailing) - } + Section("Name") { + TextField("Name", text: self.$server.name) } self.serverConfigurationSections Section { diff --git a/DNSecure/Views/DoHSections.swift b/DNSecure/Views/DoHSections.swift index 25bbc0f..8c2a7d8 100644 --- a/DNSecure/Views/DoHSections.swift +++ b/DNSecure/Views/DoHSections.swift @@ -15,20 +15,11 @@ extension DoHSections: View { var body: some View { Section { ForEach(0..