mirror of
https://github.com/krille-chan/fluffychat
synced 2024-09-10 12:25:11 +00:00
design: Make incoming messages color more light
This commit is contained in:
parent
991bba2535
commit
969dbef09a
1 changed files with 3 additions and 3 deletions
|
@ -70,7 +70,7 @@ class Message extends StatelessWidget {
|
||||||
final client = Matrix.of(context).client;
|
final client = Matrix.of(context).client;
|
||||||
final ownMessage = event.senderId == client.userID;
|
final ownMessage = event.senderId == client.userID;
|
||||||
final alignment = ownMessage ? Alignment.topRight : Alignment.topLeft;
|
final alignment = ownMessage ? Alignment.topRight : Alignment.topLeft;
|
||||||
var color = Theme.of(context).colorScheme.surfaceVariant;
|
var color = Theme.of(context).colorScheme.onInverseSurface;
|
||||||
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);
|
||||||
|
@ -84,7 +84,7 @@ class Message extends StatelessWidget {
|
||||||
nextEvent!.senderId == event.senderId &&
|
nextEvent!.senderId == event.senderId &&
|
||||||
!displayTime;
|
!displayTime;
|
||||||
final textColor = ownMessage
|
final textColor = ownMessage
|
||||||
? Theme.of(context).colorScheme.onPrimary
|
? Theme.of(context).colorScheme.onPrimaryContainer
|
||||||
: Theme.of(context).colorScheme.onBackground;
|
: Theme.of(context).colorScheme.onBackground;
|
||||||
final rowMainAxisAlignment =
|
final rowMainAxisAlignment =
|
||||||
ownMessage ? MainAxisAlignment.end : MainAxisAlignment.start;
|
ownMessage ? MainAxisAlignment.end : MainAxisAlignment.start;
|
||||||
|
@ -114,7 +114,7 @@ class Message extends StatelessWidget {
|
||||||
if (ownMessage) {
|
if (ownMessage) {
|
||||||
color = displayEvent.status.isError
|
color = displayEvent.status.isError
|
||||||
? Colors.redAccent
|
? Colors.redAccent
|
||||||
: Theme.of(context).colorScheme.primary;
|
: Theme.of(context).colorScheme.primaryContainer;
|
||||||
}
|
}
|
||||||
|
|
||||||
final row = Row(
|
final row = Row(
|
||||||
|
|
Loading…
Reference in a new issue