diff --git a/ui/BankingiOSApp/BankingiOSApp/extensions/ViewExtensions.swift b/ui/BankingiOSApp/BankingiOSApp/extensions/ViewExtensions.swift index be128875..3662ac3f 100644 --- a/ui/BankingiOSApp/BankingiOSApp/extensions/ViewExtensions.swift +++ b/ui/BankingiOSApp/BankingiOSApp/extensions/ViewExtensions.swift @@ -60,6 +60,11 @@ extension View { } + func makeBackgroundTapable() -> some View { + return self.background(Color.systemBackground) + } + + func detailForegroundColor() -> some View { return self .foregroundColor(Color.secondary) diff --git a/ui/BankingiOSApp/BankingiOSApp/ui/dialogs/SettingsDialog.swift b/ui/BankingiOSApp/BankingiOSApp/ui/dialogs/SettingsDialog.swift index 6e3f5970..f1ebb914 100644 --- a/ui/BankingiOSApp/BankingiOSApp/ui/dialogs/SettingsDialog.swift +++ b/ui/BankingiOSApp/BankingiOSApp/ui/dialogs/SettingsDialog.swift @@ -44,7 +44,7 @@ struct SettingsDialog: View { NavigationLink(destination: EmptyView(), isActive: .constant(false)) { // we need custom navigation handling, so disable that NavigationLink takes care of navigating Text("Secure app data") .frame(maxWidth: .infinity, alignment: .leading) // stretch over full width - .background(Color.systemBackground) // make background tapable + .makeBackgroundTapable() } } .onTapGesture { diff --git a/ui/BankingiOSApp/BankingiOSApp/ui/views/listitems/AccountTransactionListItem.swift b/ui/BankingiOSApp/BankingiOSApp/ui/views/listitems/AccountTransactionListItem.swift index eba70bd9..ebad1402 100644 --- a/ui/BankingiOSApp/BankingiOSApp/ui/views/listitems/AccountTransactionListItem.swift +++ b/ui/BankingiOSApp/BankingiOSApp/ui/views/listitems/AccountTransactionListItem.swift @@ -55,6 +55,7 @@ struct AccountTransactionListItem: View { Spacer() } } + .makeBackgroundTapable() .contextMenu { if transaction.canCreateMoneyTransferFrom { Button(action: { self.navigateToTransferMoneyDialog(TransferMoneyData.Companion().fromAccountTransactionWithoutAmountAndReference(transaction: self.transaction)) }) { diff --git a/ui/BankingiOSApp/BankingiOSApp/ui/views/listitems/AllBanksListItem.swift b/ui/BankingiOSApp/BankingiOSApp/ui/views/listitems/AllBanksListItem.swift index 181ad18b..5997dc50 100644 --- a/ui/BankingiOSApp/BankingiOSApp/ui/views/listitems/AllBanksListItem.swift +++ b/ui/BankingiOSApp/BankingiOSApp/ui/views/listitems/AllBanksListItem.swift @@ -23,7 +23,7 @@ struct AllBanksListItem: View { AmountLabel(banks.sumBalances()) } .frame(height: 35) - .background(Color.systemBackground) // make background tapable + .makeBackgroundTapable() } .onTapGesture { SceneDelegate.navigateToView(AccountTransactionsDialog(allBanks: self.banks)) diff --git a/ui/BankingiOSApp/BankingiOSApp/ui/views/listitems/BankAccountListItem.swift b/ui/BankingiOSApp/BankingiOSApp/ui/views/listitems/BankAccountListItem.swift index 09fed1e4..4734fdfe 100644 --- a/ui/BankingiOSApp/BankingiOSApp/ui/views/listitems/BankAccountListItem.swift +++ b/ui/BankingiOSApp/BankingiOSApp/ui/views/listitems/BankAccountListItem.swift @@ -13,7 +13,7 @@ struct BankAccountListItem : View { NavigationLink(destination: LazyView(AccountTransactionsDialog(account: self.account)), isActive: $navigateToAccountTransactionsDialog) { LabelledAmount(account.displayName, account.balance, account.currency) .frame(height: 35) - .background(Color.systemBackground) // make background tapable + .makeBackgroundTapable() } .disabled( !account.isAccountTypeSupportedByApplication) .contextMenu { diff --git a/ui/BankingiOSApp/BankingiOSApp/ui/views/listitems/BankListItem.swift b/ui/BankingiOSApp/BankingiOSApp/ui/views/listitems/BankListItem.swift index 883312e9..13f836f9 100644 --- a/ui/BankingiOSApp/BankingiOSApp/ui/views/listitems/BankListItem.swift +++ b/ui/BankingiOSApp/BankingiOSApp/ui/views/listitems/BankListItem.swift @@ -23,7 +23,7 @@ struct BankListItem : View { AmountLabel(bank.balance) } .frame(height: 35) - .background(Color.systemBackground) // make background tapable + .makeBackgroundTapable() .contextMenu { Button(action: { self.navigateToBankSettingsDialog() }) { HStack { diff --git a/ui/BankingiOSApp/BankingiOSApp/ui/views/listitems/RecipientListItem.swift b/ui/BankingiOSApp/BankingiOSApp/ui/views/listitems/RecipientListItem.swift index 8a78417f..0340cacd 100644 --- a/ui/BankingiOSApp/BankingiOSApp/ui/views/listitems/RecipientListItem.swift +++ b/ui/BankingiOSApp/BankingiOSApp/ui/views/listitems/RecipientListItem.swift @@ -42,6 +42,7 @@ struct RecipientListItem: View { .padding(.bottom, 6.0) } + .makeBackgroundTapable() } }