Renamed alignVertically() to correctly alignHorizontally()

This commit is contained in:
dankito 2020-09-07 01:36:53 +02:00
parent e8614a3b47
commit 874d78d6ad
6 changed files with 13 additions and 13 deletions

View File

@ -92,7 +92,7 @@
36D60F7924FFB6F100596ABC /* Messages.swift in Sources */ = {isa = PBXBuildFile; fileRef = 36D60F7824FFB6F100596ABC /* Messages.swift */; }; 36D60F7924FFB6F100596ABC /* Messages.swift in Sources */ = {isa = PBXBuildFile; fileRef = 36D60F7824FFB6F100596ABC /* Messages.swift */; };
36E21ECB24D88DF000649DC8 /* UIKitExtensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 36E21ECA24D88DF000649DC8 /* UIKitExtensions.swift */; }; 36E21ECB24D88DF000649DC8 /* UIKitExtensions.swift in Sources */ = {isa = PBXBuildFile; fileRef = 36E21ECA24D88DF000649DC8 /* UIKitExtensions.swift */; };
36E21ECF24DA0EEE00649DC8 /* IconView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 36E21ECE24DA0EEE00649DC8 /* IconView.swift */; }; 36E21ECF24DA0EEE00649DC8 /* IconView.swift in Sources */ = {isa = PBXBuildFile; fileRef = 36E21ECE24DA0EEE00649DC8 /* IconView.swift */; };
36E21ED124DC540400649DC8 /* SettingsDialog.swift in Sources */ = {isa = PBXBuildFile; fileRef = 36E21ED024DC540400649DC8 /* SettingsDialog.swift */; }; 36E21ED124DC540400649DC8 /* SettingsTab.swift in Sources */ = {isa = PBXBuildFile; fileRef = 36E21ED024DC540400649DC8 /* SettingsTab.swift */; };
36E21ED524DC549800649DC8 /* BankSettingsDialog.swift in Sources */ = {isa = PBXBuildFile; fileRef = 36E21ED424DC549800649DC8 /* BankSettingsDialog.swift */; }; 36E21ED524DC549800649DC8 /* BankSettingsDialog.swift in Sources */ = {isa = PBXBuildFile; fileRef = 36E21ED424DC549800649DC8 /* BankSettingsDialog.swift */; };
36E21ED724DC617200649DC8 /* BankAccountSettingsDialog.swift in Sources */ = {isa = PBXBuildFile; fileRef = 36E21ED624DC617200649DC8 /* BankAccountSettingsDialog.swift */; }; 36E21ED724DC617200649DC8 /* BankAccountSettingsDialog.swift in Sources */ = {isa = PBXBuildFile; fileRef = 36E21ED624DC617200649DC8 /* BankAccountSettingsDialog.swift */; };
36E21EDB24DC990300649DC8 /* LabelledUIKitTextField.swift in Sources */ = {isa = PBXBuildFile; fileRef = 36E21EDA24DC990300649DC8 /* LabelledUIKitTextField.swift */; }; 36E21EDB24DC990300649DC8 /* LabelledUIKitTextField.swift in Sources */ = {isa = PBXBuildFile; fileRef = 36E21EDA24DC990300649DC8 /* LabelledUIKitTextField.swift */; };
@ -233,7 +233,7 @@
36D60F7824FFB6F100596ABC /* Messages.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Messages.swift; sourceTree = "<group>"; }; 36D60F7824FFB6F100596ABC /* Messages.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = Messages.swift; sourceTree = "<group>"; };
36E21ECA24D88DF000649DC8 /* UIKitExtensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIKitExtensions.swift; sourceTree = "<group>"; }; 36E21ECA24D88DF000649DC8 /* UIKitExtensions.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = UIKitExtensions.swift; sourceTree = "<group>"; };
36E21ECE24DA0EEE00649DC8 /* IconView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = IconView.swift; sourceTree = "<group>"; }; 36E21ECE24DA0EEE00649DC8 /* IconView.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = IconView.swift; sourceTree = "<group>"; };
36E21ED024DC540400649DC8 /* SettingsDialog.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingsDialog.swift; sourceTree = "<group>"; }; 36E21ED024DC540400649DC8 /* SettingsTab.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = SettingsTab.swift; sourceTree = "<group>"; };
36E21ED424DC549800649DC8 /* BankSettingsDialog.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BankSettingsDialog.swift; sourceTree = "<group>"; }; 36E21ED424DC549800649DC8 /* BankSettingsDialog.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BankSettingsDialog.swift; sourceTree = "<group>"; };
36E21ED624DC617200649DC8 /* BankAccountSettingsDialog.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BankAccountSettingsDialog.swift; sourceTree = "<group>"; }; 36E21ED624DC617200649DC8 /* BankAccountSettingsDialog.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BankAccountSettingsDialog.swift; sourceTree = "<group>"; };
36E21EDA24DC990300649DC8 /* LabelledUIKitTextField.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LabelledUIKitTextField.swift; sourceTree = "<group>"; }; 36E21EDA24DC990300649DC8 /* LabelledUIKitTextField.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = LabelledUIKitTextField.swift; sourceTree = "<group>"; };
@ -516,7 +516,7 @@
36BE064E24C9A17F00CBBB68 /* ImageTanView.swift */, 36BE064E24C9A17F00CBBB68 /* ImageTanView.swift */,
360782C624E544170098FEFE /* FlickerCodeTanView.swift */, 360782C624E544170098FEFE /* FlickerCodeTanView.swift */,
360782D224F429F70098FEFE /* FlickerCodeStripe.swift */, 360782D224F429F70098FEFE /* FlickerCodeStripe.swift */,
36E21ED024DC540400649DC8 /* SettingsDialog.swift */, 36E21ED024DC540400649DC8 /* SettingsTab.swift */,
36E21ED424DC549800649DC8 /* BankSettingsDialog.swift */, 36E21ED424DC549800649DC8 /* BankSettingsDialog.swift */,
36E21ED624DC617200649DC8 /* BankAccountSettingsDialog.swift */, 36E21ED624DC617200649DC8 /* BankAccountSettingsDialog.swift */,
36B8A4472503D12100C15359 /* ProtectAppSettingsDialog.swift */, 36B8A4472503D12100C15359 /* ProtectAppSettingsDialog.swift */,
@ -772,7 +772,7 @@
36BE068F24CEE1BD00CBBB68 /* AllBanksListItem.swift in Sources */, 36BE068F24CEE1BD00CBBB68 /* AllBanksListItem.swift in Sources */,
360782C324E49FF70098FEFE /* ValidationLabel.swift in Sources */, 360782C324E49FF70098FEFE /* ValidationLabel.swift in Sources */,
36BE069124CEF52800CBBB68 /* UpdateButton.swift in Sources */, 36BE069124CEF52800CBBB68 /* UpdateButton.swift in Sources */,
36E21ED124DC540400649DC8 /* SettingsDialog.swift in Sources */, 36E21ED124DC540400649DC8 /* SettingsTab.swift in Sources */,
366FA4DC24C479120094F009 /* BankInfoListItem.swift in Sources */, 366FA4DC24C479120094F009 /* BankInfoListItem.swift in Sources */,
36B8A44B2503D1E800C15359 /* BiometricAuthenticationService.swift in Sources */, 36B8A44B2503D1E800C15359 /* BiometricAuthenticationService.swift in Sources */,
36FC929E24B39A05002B12E9 /* SceneDelegate.swift in Sources */, 36FC929E24B39A05002B12E9 /* SceneDelegate.swift in Sources */,

View File

@ -75,7 +75,7 @@ extension View {
} }
func systemGroupedBackground() -> some View { func systemGroupedBackground() -> some View {
return self.background(Color(UIColor.systemGroupedBackground)) return self.background(Color.systemGroupedBackground)
} }
func styleAmount(amount: CommonBigDecimal) -> some View { func styleAmount(amount: CommonBigDecimal) -> some View {
@ -87,7 +87,7 @@ extension View {
} }
func alignVertically(_ alignment: Alignment) -> some View { func alignHorizontally(_ alignment: Alignment) -> some View {
return self.frame(maxWidth: .infinity, alignment: alignment) return self.frame(maxWidth: .infinity, alignment: alignment)
} }

View File

@ -74,7 +74,7 @@ struct LoginDialog: View {
Section { Section {
Button("Login") { self.loginWithPassword() } Button("Login") { self.loginWithPassword() }
.alignVertically(.center) .alignHorizontally(.center)
} }
} }
} }

View File

@ -88,21 +88,21 @@ struct ProtectAppSettingsDialog: View {
} }
} }
.pickerStyle(SegmentedPickerStyle()) .pickerStyle(SegmentedPickerStyle())
.alignVertically(.center) .alignHorizontally(.center)
} }
} }
if isFaceIDSelected { if isFaceIDSelected {
Section { Section {
FaceIDButton(self.doBiometricAuthentication) FaceIDButton(self.doBiometricAuthentication)
.alignVertically(.center) .alignHorizontally(.center)
} }
} }
if isTouchIDSelected { if isTouchIDSelected {
Section { Section {
TouchIDButton(self.doBiometricAuthentication) TouchIDButton(self.doBiometricAuthentication)
.alignVertically(.center) .alignHorizontally(.center)
} }
} }
@ -128,7 +128,7 @@ struct ProtectAppSettingsDialog: View {
Spacer() Spacer()
Button(isNoAppProtectionSelected ? "Remove app protection" : "OK") { self.setAuthenticationType() } Button(isNoAppProtectionSelected ? "Remove app protection" : "OK") { self.setAuthenticationType() }
.alignVertically(.center) .alignHorizontally(.center)
.foregroundColor(isNoAppProtectionSelected ? Color.destructive : nil) .foregroundColor(isNoAppProtectionSelected ? Color.destructive : nil)
.disabled( !self.authenticatedWithNewAuthenticationType) .disabled( !self.authenticatedWithNewAuthenticationType)

View File

@ -17,7 +17,7 @@ struct SectionHeaderWithRightAlignedEditButton: View {
var body: some View { var body: some View {
EditButton() EditButton()
.alignVertically(.trailing) .alignHorizontally(.trailing)
.disabled( !isEditButtonEnabled) .disabled( !isEditButtonEnabled)
.overlay(Text(sectionTitle), alignment: .leading) .overlay(Text(sectionTitle), alignment: .leading)
} }

View File

@ -61,7 +61,7 @@ struct SelectBankDialog: View {
if supportedBanksSearchResults.isEmpty { if supportedBanksSearchResults.isEmpty {
Text("No supported banks found") Text("No supported banks found")
.detailForegroundColor() .detailForegroundColor()
.alignVertically(.center) .alignHorizontally(.center)
} }
else { else {
Section { Section {