From 57dbe2b8ab62d73ce5bc92e7e3187a7f8cf61d4c Mon Sep 17 00:00:00 2001 From: Rizwan Mohamed Ibrahim Date: Wed, 8 Jul 2020 16:09:49 +0530 Subject: [PATCH] Fix header image white background --- .../Accounts/SettingsFeedbinAccountView.swift | 43 +++++++++---------- .../Accounts/SettingsLocalAccountView.swift | 31 ++++++------- 2 files changed, 34 insertions(+), 40 deletions(-) diff --git a/Multiplatform/iOS/Settings/Accounts/SettingsFeedbinAccountView.swift b/Multiplatform/iOS/Settings/Accounts/SettingsFeedbinAccountView.swift index 8baaec9e8..8d9f236ff 100644 --- a/Multiplatform/iOS/Settings/Accounts/SettingsFeedbinAccountView.swift +++ b/Multiplatform/iOS/Settings/Accounts/SettingsFeedbinAccountView.swift @@ -18,34 +18,31 @@ struct SettingsFeedbinAccountView: View { var body: some View { NavigationView { - VStack { - AccountHeaderImageView(image: AppAssets.image(for: .feedbin)!) - List { - Section { - TextField("Email", text: $settingsModel.email).textContentType(.emailAddress) - SecureField("Password", text: $settingsModel.password) - } - Section(footer: errorFooter) { - HStack { - Spacer() - Button(action: { settingsModel.addAccount() }) { - if settingsModel.isUpdate { - Text("Update Account") - } else { - Text("Add Account") - } - } - .disabled(!settingsModel.isValid) - Spacer() - if settingsModel.busy { - ProgressView() + List { + Section(header: AccountHeaderImageView(image: AppAssets.image(for: .feedbin)!)) { + TextField("Email", text: $settingsModel.email).textContentType(.emailAddress) + SecureField("Password", text: $settingsModel.password) + } + Section(footer: errorFooter) { + HStack { + Spacer() + Button(action: { settingsModel.addAccount() }) { + if settingsModel.isUpdate { + Text("Update Account") + } else { + Text("Add Account") } } + .disabled(!settingsModel.isValid) + Spacer() + if settingsModel.busy { + ProgressView() + } } } - .listStyle(InsetGroupedListStyle()) - .disabled(settingsModel.busy) } + .listStyle(InsetGroupedListStyle()) + .disabled(settingsModel.busy) .onReceive(settingsModel.$shouldDismiss, perform: { dismiss in if dismiss == true { presentationMode.wrappedValue.dismiss() diff --git a/Multiplatform/iOS/Settings/Accounts/SettingsLocalAccountView.swift b/Multiplatform/iOS/Settings/Accounts/SettingsLocalAccountView.swift index e60b52a63..c7753d6ac 100644 --- a/Multiplatform/iOS/Settings/Accounts/SettingsLocalAccountView.swift +++ b/Multiplatform/iOS/Settings/Accounts/SettingsLocalAccountView.swift @@ -15,26 +15,23 @@ struct SettingsLocalAccountView: View { var body: some View { NavigationView { - VStack(spacing: 0) { - AccountHeaderImageView(image: AppAssets.image(for: .onMyMac)!) - List { - Section { - HStack { - TextField("Name", text: $name) - } - } - Section { - HStack { - Spacer() - Button(action: { self.addAccount() }) { - Text("Add Account") - } - Spacer() - } + List { + Section(header: AccountHeaderImageView(image: AppAssets.image(for: .onMyMac)!)) { + HStack { + TextField("Name", text: $name) + } + } + Section { + HStack { + Spacer() + Button(action: { self.addAccount() }) { + Text("Add Account") + } + Spacer() } } - .listStyle(InsetGroupedListStyle()) } + .listStyle(InsetGroupedListStyle()) .navigationBarTitle(Text(verbatim: Account.defaultLocalAccountName), displayMode: .inline) .navigationBarItems(leading: Button(action: { self.dismiss() }) { Text("Cancel") } ) }