chore: Adjust bubble color in dark mode

This commit is contained in:
Christian Pauly 2022-08-31 16:06:53 +02:00
parent 9ed1fcf2c7
commit 1370e892cd
2 changed files with 3 additions and 7 deletions

View File

@ -249,10 +249,7 @@ class ChatView extends StatelessWidget {
Radius.circular(AppConfig.borderRadius), Radius.circular(AppConfig.borderRadius),
), ),
elevation: 4, elevation: 4,
shadowColor: Theme.of(context) shadowColor: Colors.black.withAlpha(64),
.colorScheme
.onBackground
.withAlpha(64),
clipBehavior: Clip.hardEdge, clipBehavior: Clip.hardEdge,
color: Theme.of(context).brightness == color: Theme.of(context).brightness ==
Brightness.light Brightness.light

View File

@ -70,7 +70,7 @@ class Message extends StatelessWidget {
final alignment = ownMessage ? Alignment.topRight : Alignment.topLeft; final alignment = ownMessage ? Alignment.topRight : Alignment.topLeft;
var color = Theme.of(context).brightness == Brightness.light var color = Theme.of(context).brightness == Brightness.light
? Colors.white ? Colors.white
: Colors.black; : Theme.of(context).colorScheme.surfaceVariant;
final displayTime = event.type == EventTypes.RoomCreate || final displayTime = event.type == EventTypes.RoomCreate ||
nextEvent == null || nextEvent == null ||
!event.originServerTs.sameEnvironment(nextEvent!.originServerTs); !event.originServerTs.sameEnvironment(nextEvent!.originServerTs);
@ -174,8 +174,7 @@ class Message extends StatelessWidget {
child: Material( child: Material(
color: noBubble ? Colors.transparent : color, color: noBubble ? Colors.transparent : color,
elevation: event.type == EventTypes.Sticker ? 0 : 4, elevation: event.type == EventTypes.Sticker ? 0 : 4,
shadowColor: shadowColor: Colors.black.withAlpha(64),
Theme.of(context).colorScheme.onBackground.withAlpha(64),
borderRadius: borderRadius, borderRadius: borderRadius,
clipBehavior: Clip.antiAlias, clipBehavior: Clip.antiAlias,
child: InkWell( child: InkWell(