From 0fab3ec04f8de50c2c7bd1804a9e5dbf238d6422 Mon Sep 17 00:00:00 2001 From: julian Date: Sat, 24 Sep 2022 10:16:42 -0600 Subject: [PATCH] dark theme color fixes --- lib/pages/send_view/confirm_transaction_view.dart | 15 +++++++++++++-- lib/pages/send_view/send_view.dart | 10 ++++++++++ lib/utilities/theme/color_theme.dart | 1 + lib/utilities/theme/dark_colors.dart | 2 ++ lib/utilities/theme/light_colors.dart | 2 ++ lib/utilities/theme/stack_colors.dart | 11 +++++++++++ 6 files changed, 39 insertions(+), 2 deletions(-) diff --git a/lib/pages/send_view/confirm_transaction_view.dart b/lib/pages/send_view/confirm_transaction_view.dart index fff346ee7..65537f20e 100644 --- a/lib/pages/send_view/confirm_transaction_view.dart +++ b/lib/pages/send_view/confirm_transaction_view.dart @@ -144,6 +144,7 @@ class _ConfirmTransactionViewState final managerProvider = ref.watch(walletsChangeNotifierProvider .select((value) => value.getManagerProvider(walletId))); return Scaffold( + backgroundColor: Theme.of(context).extension()!.background, appBar: AppBar( backgroundColor: Theme.of(context).extension()!.background, leading: AppBarBackButton( @@ -294,7 +295,12 @@ class _ConfirmTransactionViewState children: [ Text( "Total amount", - style: STextStyles.titleBold12(context), + style: + STextStyles.titleBold12(context).copyWith( + color: Theme.of(context) + .extension()! + .textConfirmTotalAmount, + ), ), Text( "${Format.satoshiAmountToPrettyString( @@ -308,7 +314,12 @@ class _ConfirmTransactionViewState managerProvider .select((value) => value.coin), ).ticker}", - style: STextStyles.itemSubtitle12(context), + style: STextStyles.itemSubtitle12(context) + .copyWith( + color: Theme.of(context) + .extension()! + .textConfirmTotalAmount, + ), textAlign: TextAlign.right, ), ], diff --git a/lib/pages/send_view/send_view.dart b/lib/pages/send_view/send_view.dart index ee9644c2a..f87252291 100644 --- a/lib/pages/send_view/send_view.dart +++ b/lib/pages/send_view/send_view.dart @@ -1060,6 +1060,11 @@ class _SendViewState extends ConsumerState { height: 8, ), TextField( + style: STextStyles.smallMed14(context).copyWith( + color: Theme.of(context) + .extension()! + .textDark, + ), key: const Key("amountInputFieldCryptoTextFieldKey"), controller: cryptoAmountController, focusNode: _cryptoFocus, @@ -1106,6 +1111,11 @@ class _SendViewState extends ConsumerState { height: 8, ), TextField( + style: STextStyles.smallMed14(context).copyWith( + color: Theme.of(context) + .extension()! + .textDark, + ), key: const Key("amountInputFieldFiatTextFieldKey"), controller: baseAmountController, focusNode: _baseFocus, diff --git a/lib/utilities/theme/color_theme.dart b/lib/utilities/theme/color_theme.dart index 32a462f9e..0ee4b2d70 100644 --- a/lib/utilities/theme/color_theme.dart +++ b/lib/utilities/theme/color_theme.dart @@ -173,6 +173,7 @@ abstract class StackColorTheme { Color get loadingOverlayTextColor; Color get myStackContactIconBG; + Color get textConfirmTotalAmount; } class CoinThemeColor { diff --git a/lib/utilities/theme/dark_colors.dart b/lib/utilities/theme/dark_colors.dart index ee7551a27..04e36a537 100644 --- a/lib/utilities/theme/dark_colors.dart +++ b/lib/utilities/theme/dark_colors.dart @@ -299,4 +299,6 @@ class DarkColors extends StackColorTheme { Color get loadingOverlayTextColor => const Color(0xFFF7F7F7); @override Color get myStackContactIconBG => const Color(0x88747778); + @override + Color get textConfirmTotalAmount => const Color(0xFF003921); } diff --git a/lib/utilities/theme/light_colors.dart b/lib/utilities/theme/light_colors.dart index 994a876d8..e3d9eeb3c 100644 --- a/lib/utilities/theme/light_colors.dart +++ b/lib/utilities/theme/light_colors.dart @@ -299,4 +299,6 @@ class LightColors extends StackColorTheme { Color get loadingOverlayTextColor => const Color(0xFFF7F7F7); @override Color get myStackContactIconBG => textFieldDefaultBG; + @override + Color get textConfirmTotalAmount => const Color(0xFF232323); } diff --git a/lib/utilities/theme/stack_colors.dart b/lib/utilities/theme/stack_colors.dart index 134439f51..6116615c4 100644 --- a/lib/utilities/theme/stack_colors.dart +++ b/lib/utilities/theme/stack_colors.dart @@ -168,6 +168,7 @@ class StackColors extends ThemeExtension { final Color warningBackground; final Color loadingOverlayTextColor; final Color myStackContactIconBG; + final Color textConfirmTotalAmount; StackColors({ required this.themeType, @@ -298,6 +299,7 @@ class StackColors extends ThemeExtension { required this.warningBackground, required this.loadingOverlayTextColor, required this.myStackContactIconBG, + required this.textConfirmTotalAmount, }); factory StackColors.fromStackColorTheme(StackColorTheme colorTheme) { @@ -432,6 +434,7 @@ class StackColors extends ThemeExtension { warningBackground: colorTheme.warningBackground, loadingOverlayTextColor: colorTheme.loadingOverlayTextColor, myStackContactIconBG: colorTheme.myStackContactIconBG, + textConfirmTotalAmount: colorTheme.textConfirmTotalAmount, ); } @@ -565,6 +568,7 @@ class StackColors extends ThemeExtension { Color? warningBackground, Color? loadingOverlayTextColor, Color? myStackContactIconBG, + Color? textConfirmTotalAmount, }) { return StackColors( themeType: themeType ?? this.themeType, @@ -730,6 +734,8 @@ class StackColors extends ThemeExtension { loadingOverlayTextColor: loadingOverlayTextColor ?? this.loadingOverlayTextColor, myStackContactIconBG: myStackContactIconBG ?? this.myStackContactIconBG, + textConfirmTotalAmount: + textConfirmTotalAmount ?? this.textConfirmTotalAmount, ); } @@ -1377,6 +1383,11 @@ class StackColors extends ThemeExtension { other.myStackContactIconBG, t, )!, + textConfirmTotalAmount: Color.lerp( + textConfirmTotalAmount, + other.textConfirmTotalAmount, + t, + )!, ); }