diff --git a/lib/src/screens/monero_accounts/widgets/account_tile.dart b/lib/src/screens/monero_accounts/widgets/account_tile.dart index 2d2185c8b..de4de3170 100644 --- a/lib/src/screens/monero_accounts/widgets/account_tile.dart +++ b/lib/src/screens/monero_accounts/widgets/account_tile.dart @@ -20,7 +20,7 @@ class AccountTile extends StatelessWidget { @override Widget build(BuildContext context) { final color = isCurrent - ? Theme.of(context).textTheme!.titleSmall!.decorationColor! + ? Theme.of(context).dialogBackgroundColor : Theme.of(context).textTheme!.displayLarge!.decorationColor!; final textColor = isCurrent ? Theme.of(context).primaryColor diff --git a/lib/src/screens/send/widgets/choose_yat_address_alert.dart b/lib/src/screens/send/widgets/choose_yat_address_alert.dart index f18c116f6..e224af593 100644 --- a/lib/src/screens/send/widgets/choose_yat_address_alert.dart +++ b/lib/src/screens/send/widgets/choose_yat_address_alert.dart @@ -66,7 +66,7 @@ class ChooseYatAddressButtonsState extends State { Container( width: 300, height: 158, - color: Theme.of(context).accentTextTheme!.bodyMedium!.backgroundColor!, + color: Theme.of(context).dialogBackgroundColor, child: ListView.separated( controller: controller, padding: EdgeInsets.all(0), diff --git a/lib/src/screens/setup_2fa/widgets/popup_cancellable_alert.dart b/lib/src/screens/setup_2fa/widgets/popup_cancellable_alert.dart index fb8d26102..f9ea2a5a6 100644 --- a/lib/src/screens/setup_2fa/widgets/popup_cancellable_alert.dart +++ b/lib/src/screens/setup_2fa/widgets/popup_cancellable_alert.dart @@ -55,7 +55,7 @@ class PopUpCancellableAlertDialog extends StatelessWidget { child: Container( width: 340, padding: EdgeInsets.all(10), - color: Theme.of(context).accentTextTheme.titleLarge!.decorationColor!, + color: Theme.of(context).dialogBackgroundColor, child: Column( mainAxisSize: MainAxisSize.min, children: [ diff --git a/lib/src/widgets/alert_with_one_action.dart b/lib/src/widgets/alert_with_one_action.dart index a0f92773e..c06114f5b 100644 --- a/lib/src/widgets/alert_with_one_action.dart +++ b/lib/src/widgets/alert_with_one_action.dart @@ -31,10 +31,7 @@ class AlertWithOneAction extends BaseAlertDialog { width: 300, height: 52, padding: EdgeInsets.only(left: 12, right: 12), - color: Theme.of(context) - .accentTextTheme! - .bodyMedium! - .backgroundColor!, + color: Theme.of(context).dialogBackgroundColor, child: ButtonTheme( minWidth: double.infinity, child: TextButton( diff --git a/lib/src/widgets/base_alert_dialog.dart b/lib/src/widgets/base_alert_dialog.dart index 8ff3ddc1d..98ce6501d 100644 --- a/lib/src/widgets/base_alert_dialog.dart +++ b/lib/src/widgets/base_alert_dialog.dart @@ -57,10 +57,7 @@ class BaseAlertDialog extends StatelessWidget { onPressed: actionLeft, style: TextButton.styleFrom( backgroundColor: leftActionButtonColor ?? - Theme.of(context) - .accentTextTheme! - .bodyLarge! - .decorationColor!, + Theme.of(context).dialogBackgroundColor, shape: const RoundedRectangleBorder( borderRadius: BorderRadius.all(Radius.zero))), child: Text( @@ -85,10 +82,7 @@ class BaseAlertDialog extends StatelessWidget { onPressed: actionRight, style: TextButton.styleFrom( backgroundColor: rightActionButtonColor ?? - Theme.of(context) - .accentTextTheme! - .bodyMedium! - .backgroundColor!, + Theme.of(context).dialogBackgroundColor, shape: const RoundedRectangleBorder( borderRadius: BorderRadius.all(Radius.zero))), child: Text( @@ -125,10 +119,7 @@ class BaseAlertDialog extends StatelessWidget { borderRadius: BorderRadius.all(Radius.circular(30)), child: Container( width: 300, - color: Theme.of(context) - .accentTextTheme! - .titleLarge! - .decorationColor!, + color: Theme.of(context).dialogBackgroundColor, child: Column( mainAxisSize: MainAxisSize.min, children: [ diff --git a/lib/themes/bright_theme.dart b/lib/themes/bright_theme.dart index 0f897e660..4d6a52275 100644 --- a/lib/themes/bright_theme.dart +++ b/lib/themes/bright_theme.dart @@ -84,11 +84,6 @@ class BrightTheme extends LightTheme { decorationColor: Colors.white // background of tiles (account list) ), - // subtitle -> titleSmall - titleSmall: TextStyle( - decorationColor: - Colors.white // background of current tile (account list) - ), // body -> bodyMedium bodyMedium: TextStyle( color: Palette.moderatePurpleBlue, // scrollbar thumb @@ -193,7 +188,6 @@ class BrightTheme extends LightTheme { // title -> titleLarge titleLarge: TextStyle( backgroundColor: Palette.periwinkleCraiola, // picker divider - decorationColor: Colors.white // dialog background ), bodySmall: TextStyle( backgroundColor: Palette.moderateLavender, // button background (confirm exchange) @@ -260,11 +254,9 @@ class BrightTheme extends LightTheme { bodyMedium: TextStyle( color: Palette.darkGray, // indicators (PIN code) decorationColor: Palette.darkGray, // switch (PIN code) - backgroundColor: Colors.white // alert right button ), // body2 -> bodyLarge bodyLarge: TextStyle( - decorationColor: Colors.white, // alert left button, backgroundColor: Palette.dullGray // keyboard bar color ) )); diff --git a/lib/themes/dark_theme.dart b/lib/themes/dark_theme.dart index 6ecdf3e1b..17a3e0b60 100644 --- a/lib/themes/dark_theme.dart +++ b/lib/themes/dark_theme.dart @@ -20,6 +20,8 @@ class DarkTheme extends ThemeBase { Color get primaryTextColor => Colors.white; @override Color get containerColor => PaletteDark.nightBlue; + @override + Color get dialogBackgroundColor => PaletteDark.darkNightBlue; @override ThemeData get themeData => super.themeData.copyWith( @@ -84,11 +86,6 @@ class DarkTheme extends ThemeBase { decorationColor: PaletteDark .darkOceanBlue // background of tiles (account list) ), - // subtitle -> titleSmall - titleSmall: TextStyle( - decorationColor: PaletteDark - .darkNightBlue // background of current tile (account list) - ), // body1 -> bodyMedium bodyMedium: TextStyle( color: PaletteDark.wildBlueGrey, // scrollbar thumb @@ -196,7 +193,6 @@ class DarkTheme extends ThemeBase { // title -> titleLarge titleLarge: TextStyle( backgroundColor: PaletteDark.dividerColor, // picker divider - decorationColor: PaletteDark.darkNightBlue // dialog background ), bodySmall: TextStyle( backgroundColor: PaletteDark.deepVioletBlue, // button background (confirm exchange) @@ -269,11 +265,9 @@ class DarkTheme extends ThemeBase { bodyMedium: TextStyle( color: PaletteDark.indicatorVioletBlue, // indicators (PIN code) decorationColor: PaletteDark.lightPurpleBlue, // switch (PIN code) - backgroundColor: PaletteDark.darkNightBlue // alert right button ), // body2 -> bodyLarge bodyLarge: TextStyle( - decorationColor: PaletteDark.darkNightBlue, // alert left button backgroundColor: PaletteDark.granite // keyboard bar color ), ), diff --git a/lib/themes/light_theme.dart b/lib/themes/light_theme.dart index 918e5b3a8..6c13ed372 100644 --- a/lib/themes/light_theme.dart +++ b/lib/themes/light_theme.dart @@ -20,6 +20,8 @@ class LightTheme extends ThemeBase { Color get primaryTextColor => Palette.darkBlueCraiola; @override Color get containerColor => Palette.blueAlice; + @override + Color get dialogBackgroundColor => Colors.white; @override ThemeData get themeData => super.themeData.copyWith( @@ -84,11 +86,6 @@ class LightTheme extends ThemeBase { decorationColor: Colors.white // background of tiles (account list) ), - // subtitle -> titleSmall - titleSmall: TextStyle( - decorationColor: - Colors.white // background of current tile (account list) - ), // body -> bodyMedium bodyMedium: TextStyle( color: Palette.moderatePurpleBlue, // scrollbar thumb @@ -194,7 +191,6 @@ class LightTheme extends ThemeBase { // title -> headlititleLargene6 titleLarge: TextStyle( backgroundColor: Palette.periwinkleCraiola, // picker divider - decorationColor: Colors.white // dialog background ), bodySmall: TextStyle( backgroundColor: Palette.blueAlice, // button background (confirm exchange) @@ -261,11 +257,9 @@ class LightTheme extends ThemeBase { bodyMedium: TextStyle( color: Palette.darkGray, // indicators (PIN code) decorationColor: Palette.darkGray, // switch (PIN code) - backgroundColor: Colors.white // alert right button ), // body2 -> bodyLarge bodyLarge: TextStyle( - decorationColor: Colors.white, // alert left button, backgroundColor: Palette.dullGray // keyboard bar color ), ), diff --git a/lib/themes/theme_base.dart b/lib/themes/theme_base.dart index 1f3481f55..eadbd8a09 100644 --- a/lib/themes/theme_base.dart +++ b/lib/themes/theme_base.dart @@ -20,6 +20,7 @@ abstract class ThemeBase { Color get primaryColor; Color get primaryTextColor; Color get containerColor; + Color get dialogBackgroundColor; ColorScheme get colorScheme => ColorScheme.fromSeed( brightness: brightness, @@ -37,5 +38,6 @@ abstract class ThemeBase { .copyWith( primaryColor: primaryColor, cardColor: containerColor, + dialogBackgroundColor: dialogBackgroundColor, extensions: [pageGradientTheme]); } \ No newline at end of file