[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-taler-ios] 25/69: colors adapted for WCAG AA
From: |
gnunet |
Subject: |
[taler-taler-ios] 25/69: colors adapted for WCAG AA |
Date: |
Fri, 19 Jan 2024 09:01:58 +0100 |
This is an automated email from the git hooks/post-receive script.
marc-stibane pushed a commit to branch master
in repository taler-ios.
commit c6affde1964122242f94ce0f4e186f60b0f7d329
Author: Marc Stibane <marc@taler.net>
AuthorDate: Thu Jan 4 17:44:07 2024 +0100
colors adapted for WCAG AA
---
TalerWallet1/Helper/WalletColors.swift | 24 ++++++++++++++++--------
1 file changed, 16 insertions(+), 8 deletions(-)
diff --git a/TalerWallet1/Helper/WalletColors.swift
b/TalerWallet1/Helper/WalletColors.swift
index a358caf..11e192e 100644
--- a/TalerWallet1/Helper/WalletColors.swift
+++ b/TalerWallet1/Helper/WalletColors.swift
@@ -4,15 +4,21 @@
*/
import SwiftUI
+fileprivate let grouped = true
+
public struct WalletColors {
let tint = Color(.tintColor)
- let gray1 = Color(.systemGray)
- let gray2 = Color(.systemGray2)
+ let gray1 = Color(.systemGray) // uncompleted
+ let gray2 = Color(.systemGray2) // disabled Fore
let gray3 = Color(.systemGray3)
let gray4 = Color(.systemGray4)
let gray5 = Color(.systemGray5)
let gray6 = Color(.systemGray6)
+ let gray7 = grouped ? Color(.tertiarySystemGroupedBackground)
+ : Color(.tertiarySystemBackground) // enabled
Back
+ let gray8 = grouped ? Color(.secondarySystemGroupedBackground)
+ : Color(.secondarySystemBackground) // disabled
Back
func buttonForeColor(pressed: Bool, disabled: Bool,
prominent: Bool = false, balance: Bool = false) ->
Color {
@@ -25,27 +31,29 @@ public struct WalletColors {
func buttonBackColor(pressed: Bool, disabled: Bool,
prominent: Bool = false, balance: Bool = false) ->
Color {
balance ? (pressed ? gray5 : gray6)
- : disabled ? gray5
+ : disabled ? gray7
: prominent ? tint
- : pressed ? gray5 : gray4
+ : pressed ? gray4 : gray5
}
var backgroundColor: Color {
- gray6
+ grouped ? Color(.systemGroupedBackground)
+ : Color(.systemBackground)
}
var sideBackground: Color {
- gray5
+ gray6
}
var fieldForeground: Color { // text color
Color.primary
}
var fieldBackground: Color {
- Color(.systemBackground)
+ gray8
}
- var incompleteColor: Color {
+ var uncompletedColor: Color {
+ // used in TransactionRowView
gray1
}
func pendingColor(_ incoming: Bool) -> Color {
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
- [taler-taler-ios] branch master updated (a123c3a -> 4167b6d), gnunet, 2024/01/19
- [taler-taler-ios] 06/69: withdraw-exchange, gnunet, 2024/01/19
- [taler-taler-ios] 01/69: WithdrawExchangeV, gnunet, 2024/01/19
- [taler-taler-ios] 04/69: AccountPicker, remove exchangePaytoUris, gnunet, 2024/01/19
- [taler-taler-ios] 03/69: CurrencyInfo from Exchange, gnunet, 2024/01/19
- [taler-taler-ios] 25/69: colors adapted for WCAG AA,
gnunet <=
- [taler-taler-ios] 05/69: ToS language, gnunet, 2024/01/19
- [taler-taler-ios] 19/69: cleanup, gnunet, 2024/01/19
- [taler-taler-ios] 02/69: LoadingView, gnunet, 2024/01/19
- [taler-taler-ios] 12/69: PRINT_CHANGES, gnunet, 2024/01/19
- [taler-taler-ios] 07/69: Haptics, gnunet, 2024/01/19
- [taler-taler-ios] 31/69: Withdraw only once, gnunet, 2024/01/19
- [taler-taler-ios] 22/69: Summary in ThreeAmountsV, gnunet, 2024/01/19
- [taler-taler-ios] 30/69: Layout Balances, gnunet, 2024/01/19
- [taler-taler-ios] 20/69: button color if disabled, gnunet, 2024/01/19
- [taler-taler-ios] 10/69: Exchanges->Banking, gnunet, 2024/01/19