From 1370e892cd812bfad0ddc4327594f6867c6d8abb Mon Sep 17 00:00:00 2001 From: Christian Pauly Date: Wed, 31 Aug 2022 16:06:53 +0200 Subject: [PATCH] chore: Adjust bubble color in dark mode --- lib/pages/chat/chat_view.dart | 5 +---- lib/pages/chat/events/message.dart | 5 ++--- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/lib/pages/chat/chat_view.dart b/lib/pages/chat/chat_view.dart index dc96c80b..7e873560 100644 --- a/lib/pages/chat/chat_view.dart +++ b/lib/pages/chat/chat_view.dart @@ -249,10 +249,7 @@ class ChatView extends StatelessWidget { Radius.circular(AppConfig.borderRadius), ), elevation: 4, - shadowColor: Theme.of(context) - .colorScheme - .onBackground - .withAlpha(64), + shadowColor: Colors.black.withAlpha(64), clipBehavior: Clip.hardEdge, color: Theme.of(context).brightness == Brightness.light diff --git a/lib/pages/chat/events/message.dart b/lib/pages/chat/events/message.dart index fa526636..5a9cf5c8 100644 --- a/lib/pages/chat/events/message.dart +++ b/lib/pages/chat/events/message.dart @@ -70,7 +70,7 @@ class Message extends StatelessWidget { final alignment = ownMessage ? Alignment.topRight : Alignment.topLeft; var color = Theme.of(context).brightness == Brightness.light ? Colors.white - : Colors.black; + : Theme.of(context).colorScheme.surfaceVariant; final displayTime = event.type == EventTypes.RoomCreate || nextEvent == null || !event.originServerTs.sameEnvironment(nextEvent!.originServerTs); @@ -174,8 +174,7 @@ class Message extends StatelessWidget { child: Material( color: noBubble ? Colors.transparent : color, elevation: event.type == EventTypes.Sticker ? 0 : 4, - shadowColor: - Theme.of(context).colorScheme.onBackground.withAlpha(64), + shadowColor: Colors.black.withAlpha(64), borderRadius: borderRadius, clipBehavior: Clip.antiAlias, child: InkWell(