gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-taler-ios] 20/69: button color if disabled


From: gnunet
Subject: [taler-taler-ios] 20/69: button color if disabled
Date: Fri, 19 Jan 2024 09:01:53 +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 9adda94e6376a30cd9094e95623c8f7044cc06fe
Author: Marc Stibane <marc@taler.net>
AuthorDate: Wed Jan 3 17:49:37 2024 +0100

    button color if disabled
---
 TalerWallet1/Views/HelperViews/Buttons.swift | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/TalerWallet1/Views/HelperViews/Buttons.swift 
b/TalerWallet1/Views/HelperViews/Buttons.swift
index 9ab4a4b..7d9a788 100644
--- a/TalerWallet1/Views/HelperViews/Buttons.swift
+++ b/TalerWallet1/Views/HelperViews/Buttons.swift
@@ -110,8 +110,8 @@ struct TalerButtonStyle: ButtonStyle {
     public func makeBody(configuration: ButtonStyle.Configuration) -> some 
View {
 //        configuration.role = type == .prominent ? .primary : .normal         
 Only on macOS
             MyBigButton(//type: type,
-                   foreColor: foreColor(type: type, pressed: 
configuration.isPressed),
-                   backColor: backColor(type: type, pressed: 
configuration.isPressed),
+                   foreColor: foreColor(type: type, pressed: 
configuration.isPressed, disabled: disabled),
+                   backColor: backColor(type: type, pressed: 
configuration.isPressed, disabled: disabled),
                       dimmed: dimmed,
                configuration: configuration,
                     disabled: disabled,
@@ -120,14 +120,14 @@ struct TalerButtonStyle: ButtonStyle {
                        badge: badge)
     }
 
-    func foreColor(type: TalerButtonStyleType, pressed: Bool) -> Color {
+    func foreColor(type: TalerButtonStyleType, pressed: Bool, disabled: Bool) 
-> Color {
         return type == .plain ? WalletColors().fieldForeground :      // 
primary text color
             WalletColors().buttonForeColor(pressed: pressed,
                                           disabled: disabled,
                                          prominent: type == .prominent,
                                            balance: type == .balance)
     }
-    func backColor(type: TalerButtonStyleType, pressed: Bool) -> Color {
+    func backColor(type: TalerButtonStyleType, pressed: Bool, disabled: Bool) 
-> Color {
         return type == .plain && !pressed ? Color.clear :
             WalletColors().buttonBackColor(pressed: pressed,
                                           disabled: disabled,

-- 
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]