Fixed making whole cell tapable
This commit is contained in:
parent
6f62690444
commit
ebce0000c5
|
@ -60,6 +60,11 @@ extension View {
|
|||
}
|
||||
|
||||
|
||||
func makeBackgroundTapable() -> some View {
|
||||
return self.background(Color.systemBackground)
|
||||
}
|
||||
|
||||
|
||||
func detailForegroundColor() -> some View {
|
||||
return self
|
||||
.foregroundColor(Color.secondary)
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -55,6 +55,7 @@ struct AccountTransactionListItem: View {
|
|||
Spacer()
|
||||
}
|
||||
}
|
||||
.makeBackgroundTapable()
|
||||
.contextMenu {
|
||||
if transaction.canCreateMoneyTransferFrom {
|
||||
Button(action: { self.navigateToTransferMoneyDialog(TransferMoneyData.Companion().fromAccountTransactionWithoutAmountAndReference(transaction: self.transaction)) }) {
|
||||
|
|
|
@ -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))
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -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 {
|
||||
|
|
|
@ -42,6 +42,7 @@ struct RecipientListItem: View {
|
|||
.padding(.bottom, 6.0)
|
||||
|
||||
}
|
||||
.makeBackgroundTapable()
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue