From 0f4ef21c7073ab010f75eb4cdb2e0ee3a9d33a2a Mon Sep 17 00:00:00 2001 From: julian Date: Thu, 22 Sep 2022 08:57:06 -0600 Subject: [PATCH] warning text color fix --- .../exchange_step_views/step_4_view.dart | 6 ++++-- lib/pages/exchange_view/trade_details_view.dart | 4 ++-- .../wallet_network_settings_view.dart | 4 +++- .../delete_wallet_warning_view.dart | 4 +++- lib/utilities/theme/color_theme.dart | 8 +++++--- lib/utilities/theme/dark_colors.dart | 15 +++++++++------ lib/utilities/theme/light_colors.dart | 15 +++++++++------ 7 files changed, 35 insertions(+), 21 deletions(-) diff --git a/lib/pages/exchange_view/exchange_step_views/step_4_view.dart b/lib/pages/exchange_view/exchange_step_views/step_4_view.dart index b94f29cbe..ae4b2eeb8 100644 --- a/lib/pages/exchange_view/exchange_step_views/step_4_view.dart +++ b/lib/pages/exchange_view/exchange_step_views/step_4_view.dart @@ -177,7 +177,8 @@ class _Step4ViewState extends ConsumerState { text: "You must send at least ${model.sendAmount.toString()} ${model.sendTicker}. ", style: STextStyles.label.copyWith( - color: StackTheme.instance.color.textDark, + color: + StackTheme.instance.color.warningForeground, fontWeight: FontWeight.w700, ), children: [ @@ -185,7 +186,8 @@ class _Step4ViewState extends ConsumerState { text: "If you send less than ${model.sendAmount.toString()} ${model.sendTicker}, your transaction may not be converted and it may not be refunded.", style: STextStyles.label.copyWith( - color: StackTheme.instance.color.textDark, + color: StackTheme + .instance.color.warningForeground, fontWeight: FontWeight.w500, ), ), diff --git a/lib/pages/exchange_view/trade_details_view.dart b/lib/pages/exchange_view/trade_details_view.dart index 02b58e540..92d65f7a7 100644 --- a/lib/pages/exchange_view/trade_details_view.dart +++ b/lib/pages/exchange_view/trade_details_view.dart @@ -245,7 +245,7 @@ class _TradeDetailsViewState extends ConsumerState { trade.fromCurrency.toLowerCase() == "xmr" ? 12 : 8, )} ${trade.fromCurrency.toUpperCase()}. ", style: STextStyles.label.copyWith( - color: StackTheme.instance.color.accentColorDark, + color: StackTheme.instance.color.warningForeground, fontWeight: FontWeight.w700, ), children: [ @@ -258,7 +258,7 @@ class _TradeDetailsViewState extends ConsumerState { )} ${trade.fromCurrency.toUpperCase()}, your transaction may not be converted and it may not be refunded.", style: STextStyles.label.copyWith( color: - StackTheme.instance.color.accentColorDark, + StackTheme.instance.color.warningForeground, fontWeight: FontWeight.w500, ), ), diff --git a/lib/pages/settings_views/wallet_settings_view/wallet_network_settings_view/wallet_network_settings_view.dart b/lib/pages/settings_views/wallet_settings_view/wallet_network_settings_view/wallet_network_settings_view.dart index cede8e4f6..a589a27a4 100644 --- a/lib/pages/settings_views/wallet_settings_view/wallet_network_settings_view/wallet_network_settings_view.dart +++ b/lib/pages/settings_views/wallet_settings_view/wallet_network_settings_view/wallet_network_settings_view.dart @@ -633,7 +633,9 @@ class _WalletNetworkSettingsViewState color: StackTheme.instance.color.warningBackground, child: Text( "Please check your internet connection and make sure your current node is not having issues.", - style: STextStyles.baseXS, + style: STextStyles.baseXS.copyWith( + color: StackTheme.instance.color.warningForeground, + ), ), ), ), diff --git a/lib/pages/settings_views/wallet_settings_view/wallet_settings_wallet_settings/delete_wallet_warning_view.dart b/lib/pages/settings_views/wallet_settings_view/wallet_settings_wallet_settings/delete_wallet_warning_view.dart index 7c5fd3720..d5596f8c8 100644 --- a/lib/pages/settings_views/wallet_settings_view/wallet_settings_wallet_settings/delete_wallet_warning_view.dart +++ b/lib/pages/settings_views/wallet_settings_view/wallet_settings_wallet_settings/delete_wallet_warning_view.dart @@ -54,7 +54,9 @@ class DeleteWalletWarningView extends ConsumerWidget { color: StackTheme.instance.color.warningBackground, child: Text( "You are going to permanently delete you wallet.\n\nIf you delete your wallet, the only way you can have access to your funds is by using your backup key.\n\nStack Wallet does not keep nor is able to restore your backup key or your wallet.\n\nPLEASE SAVE YOUR BACKUP KEY.", - style: STextStyles.baseXS, + style: STextStyles.baseXS.copyWith( + color: StackTheme.instance.color.warningForeground, + ), ), ), const Spacer(), diff --git a/lib/utilities/theme/color_theme.dart b/lib/utilities/theme/color_theme.dart index 2425150ed..a63d8f697 100644 --- a/lib/utilities/theme/color_theme.dart +++ b/lib/utilities/theme/color_theme.dart @@ -10,9 +10,6 @@ enum ThemeType { abstract class StackColorTheme { Color get background; Color get overlay; - Color get warningBackground; - Color get splash; - Color get highlight; Color get accentColorBlue; Color get accentColorGreen; @@ -166,6 +163,11 @@ abstract class StackColorTheme { Color get favoriteStarActive; Color get favoriteStarInactive; + + Color get splash; + Color get highlight; + Color get warningForeground; + Color get warningBackground; } class CoinThemeColor { diff --git a/lib/utilities/theme/dark_colors.dart b/lib/utilities/theme/dark_colors.dart index 65c6bcbe8..863da21c4 100644 --- a/lib/utilities/theme/dark_colors.dart +++ b/lib/utilities/theme/dark_colors.dart @@ -6,12 +6,6 @@ class DarkColors extends StackColorTheme { Color get background => const Color(0xFF2A2D34); @override Color get overlay => const Color(0xFF111215); - @override - Color get warningBackground => const Color(0xFFFFB4A9); - @override - Color get splash => const Color(0x358E9192); - @override - Color get highlight => const Color(0x44A9ACAC); @override Color get accentColorBlue => const Color(0xFF4C86E9); @@ -289,4 +283,13 @@ class DarkColors extends StackColorTheme { Color get favoriteStarActive => accentColorYellow; @override Color get favoriteStarInactive => textSubtitle2; + + @override + Color get splash => const Color(0x358E9192); + @override + Color get highlight => const Color(0x44A9ACAC); + @override + Color get warningForeground => snackBarTextError; + @override + Color get warningBackground => const Color(0xFFFFB4A9); } diff --git a/lib/utilities/theme/light_colors.dart b/lib/utilities/theme/light_colors.dart index 6c7bb0941..00447e723 100644 --- a/lib/utilities/theme/light_colors.dart +++ b/lib/utilities/theme/light_colors.dart @@ -6,12 +6,6 @@ class LightColors extends StackColorTheme { Color get background => const Color(0xFFF7F7F7); @override Color get overlay => const Color(0xFF111215); - @override - Color get warningBackground => const Color(0xFFFFDAD3); - @override - Color get splash => const Color(0x358E9192); - @override - Color get highlight => const Color(0x44A9ACAC); @override Color get accentColorBlue => const Color(0xFF4C86E9); @@ -289,4 +283,13 @@ class LightColors extends StackColorTheme { Color get favoriteStarActive => infoItemIcons; @override Color get favoriteStarInactive => textSubtitle3; + + @override + Color get splash => const Color(0x358E9192); + @override + Color get highlight => const Color(0x44A9ACAC); + @override + Color get warningForeground => textDark; + @override + Color get warningBackground => const Color(0xFFFFDAD3); }