fix: Contrast in dark mode

This commit is contained in:
Krille Fear 2021-11-14 22:15:37 +01:00
commit f818aced60
3 changed files with 12 additions and 15 deletions

View file

@ -59,7 +59,9 @@ class Message extends StatelessWidget {
final client = Matrix.of(context).client;
final ownMessage = event.senderId == client.userID;
final alignment = ownMessage ? Alignment.topRight : Alignment.topLeft;
var color = Theme.of(context).scaffoldBackgroundColor;
var color = Theme.of(context).brightness == Brightness.light
? Colors.white
: Colors.grey.shade900;
final displayTime = event.type == EventTypes.RoomCreate ||
nextEvent == null ||
!event.originServerTs.sameEnvironment(nextEvent.originServerTs);

View file

@ -31,7 +31,9 @@ class StateMessage extends StatelessWidget {
child: Container(
padding: const EdgeInsets.all(8),
decoration: BoxDecoration(
color: Theme.of(context).scaffoldBackgroundColor,
color: Theme.of(context).brightness == Brightness.light
? Colors.white
: Colors.grey.shade900,
borderRadius: BorderRadius.circular(AppConfig.borderRadius / 2),
),
child: Column(