From 7aad7cb9e320ffc8de52a2f00dd52017f3248a6c Mon Sep 17 00:00:00 2001 From: ryleedavis Date: Thu, 5 Jan 2023 13:59:17 -0700 Subject: [PATCH] oledBlack text color fix --- .../appearance_settings_view.dart | 82 +++++++++++++++++++ lib/utilities/theme/oled_black_colors.dart | 10 +-- 2 files changed, 87 insertions(+), 5 deletions(-) diff --git a/lib/pages/settings_views/global_settings_view/appearance_settings_view.dart b/lib/pages/settings_views/global_settings_view/appearance_settings_view.dart index 9f9447a66..73da50719 100644 --- a/lib/pages/settings_views/global_settings_view/appearance_settings_view.dart +++ b/lib/pages/settings_views/global_settings_view/appearance_settings_view.dart @@ -9,6 +9,7 @@ import 'package:stackwallet/utilities/theme/color_theme.dart'; import 'package:stackwallet/utilities/theme/dark_colors.dart'; import 'package:stackwallet/utilities/theme/light_colors.dart'; import 'package:stackwallet/utilities/theme/ocean_breeze_colors.dart'; +import 'package:stackwallet/utilities/theme/oled_black_colors.dart'; import 'package:stackwallet/utilities/theme/stack_colors.dart'; import 'package:stackwallet/widgets/background.dart'; import 'package:stackwallet/widgets/custom_buttons/app_bar_icon_button.dart'; @@ -432,6 +433,87 @@ class _ThemeOptionsView extends ConsumerState { ), ), ), + const SizedBox( + height: 10, + ), + MaterialButton( + splashColor: Colors.transparent, + hoverColor: Colors.transparent, + padding: const EdgeInsets.all(0), + materialTapTargetSize: MaterialTapTargetSize.shrinkWrap, + shape: RoundedRectangleBorder( + borderRadius: BorderRadius.circular( + Constants.size.circularBorderRadius, + ), + ), + onPressed: () { + DB.instance.put( + boxName: DB.boxNameTheme, + key: "colorScheme", + value: ThemeType.oledBlack.name, + ); + ref.read(colorThemeProvider.state).state = + StackColors.fromStackColorTheme( + OledBlackColors(), + ); + + setState(() { + _selectedTheme = "oledBlack"; + }); + }, + child: SizedBox( + width: 200, + child: Column( + mainAxisSize: MainAxisSize.min, + children: [ + Row( + children: [ + SizedBox( + width: 10, + height: 10, + child: Radio( + activeColor: Theme.of(context) + .extension()! + .radioButtonIconEnabled, + value: "oledBlack", + groupValue: _selectedTheme, + onChanged: (newValue) { + if (newValue is String && newValue == "oledBlack") { + DB.instance.put( + boxName: DB.boxNameTheme, + key: "colorScheme", + value: ThemeType.oledBlack.name, + ); + ref.read(colorThemeProvider.state).state = + StackColors.fromStackColorTheme( + OledBlackColors(), + ); + + setState(() { + _selectedTheme = "oledBlack"; + }); + } + }, + ), + ), + const SizedBox( + width: 14, + ), + Text( + "OLED Black", + style: + STextStyles.desktopTextExtraSmall(context).copyWith( + color: Theme.of(context) + .extension()! + .textDark2, + ), + ), + ], + ), + ], + ), + ), + ), ], ); } diff --git a/lib/utilities/theme/oled_black_colors.dart b/lib/utilities/theme/oled_black_colors.dart index ca142276b..1a3fd0cc4 100644 --- a/lib/utilities/theme/oled_black_colors.dart +++ b/lib/utilities/theme/oled_black_colors.dart @@ -33,17 +33,17 @@ class OledBlackColors extends StackColorTheme { Color get shadow => const Color(0x0F2D3132); //not done yet @override - Color get textDark => const Color(0xFF2D3132); + Color get textDark => const Color(0xFFDEDEDE); @override - Color get textDark2 => const Color(0xFFDEDEDE); + Color get textDark2 => const Color(0xFFCCCCCC); @override - Color get textDark3 => const Color(0xFFCCCCCC); + Color get textDark3 => const Color(0xFFB2B2B2); @override Color get textSubtitle1 => const Color(0xFFB2B2B2); @override - Color get textSubtitle2 => const Color(0xFFB2B2B2); + Color get textSubtitle2 => const Color(0xFFA0A0A0); @override - Color get textSubtitle3 => const Color(0xFFA0A0A0); + Color get textSubtitle3 => const Color(0xFF878A8A); @override Color get textSubtitle4 => const Color(0xFF878A8A); @override