gnunet-svn
[Top][All Lists]
Advanced

[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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]