diff --git a/lib/pages/chat/events/message.dart b/lib/pages/chat/events/message.dart index 46586b13cd..c89d617db5 100644 --- a/lib/pages/chat/events/message.dart +++ b/lib/pages/chat/events/message.dart @@ -106,8 +106,11 @@ class Message extends StatelessWidget { previousEvent!.senderId == event.senderId && previousEvent!.originServerTs.sameEnvironment(event.originServerTs); - final textColor = - ownMessage ? theme.colorScheme.onPrimary : theme.colorScheme.onSurface; + final textColor = ownMessage + ? theme.brightness == Brightness.light + ? theme.colorScheme.onPrimary + : theme.colorScheme.onPrimaryContainer + : theme.colorScheme.onSurface; final rowMainAxisAlignment = ownMessage ? MainAxisAlignment.end : MainAxisAlignment.start; @@ -141,7 +144,9 @@ class Message extends StatelessWidget { if (ownMessage) { color = displayEvent.status.isError ? Colors.redAccent - : theme.colorScheme.primary; + : theme.brightness == Brightness.light + ? theme.colorScheme.primary + : theme.colorScheme.primaryContainer; } final resetAnimateIn = this.resetAnimateIn; diff --git a/lib/pages/settings_style/settings_style_view.dart b/lib/pages/settings_style/settings_style_view.dart index eea2bc6607..d93e492fc5 100644 --- a/lib/pages/settings_style/settings_style_view.dart +++ b/lib/pages/settings_style/settings_style_view.dart @@ -214,7 +214,9 @@ class SettingsStyleView extends StatelessWidget { ), child: DecoratedBox( decoration: BoxDecoration( - color: theme.colorScheme.primary, + color: theme.brightness == Brightness.light + ? theme.colorScheme.primary + : theme.colorScheme.primaryContainer, borderRadius: BorderRadius.circular( AppConfig.borderRadius, ), @@ -227,7 +229,11 @@ class SettingsStyleView extends StatelessWidget { child: Text( 'Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor', style: TextStyle( - color: theme.colorScheme.onPrimary, + color: + theme.brightness == Brightness.light + ? theme.colorScheme.onPrimary + : theme.colorScheme + .onPrimaryContainer, fontSize: AppConfig.messageFontSize * AppConfig.fontSizeFactor, ),