chore: Nicer background for sate message and time in chat

This commit is contained in:
krille-chan 2024-07-26 21:06:53 +02:00
parent 3434741bc5
commit 30e3a4f2ff
No known key found for this signature in database
3 changed files with 22 additions and 21 deletions

View file

@ -435,22 +435,20 @@ class Message extends StatelessWidget {
? const EdgeInsets.symmetric(vertical: 8.0)
: EdgeInsets.zero,
child: Center(
child: Material(
color: displayTime
? Theme.of(context).colorScheme.surface
: Theme.of(context).colorScheme.surface.withOpacity(0.33),
borderRadius:
BorderRadius.circular(AppConfig.borderRadius / 2),
clipBehavior: Clip.antiAlias,
child: Padding(
padding: const EdgeInsets.only(top: 4.0),
child: Text(
event.originServerTs.localizedTime(context),
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 12 * AppConfig.fontSizeFactor,
color: Theme.of(context).colorScheme.secondary,
),
child: Padding(
padding: const EdgeInsets.only(top: 4.0),
child: Text(
event.originServerTs.localizedTime(context),
style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 12 * AppConfig.fontSizeFactor,
color: Theme.of(context).colorScheme.secondary,
shadows: [
Shadow(
color: Theme.of(context).colorScheme.surface,
blurRadius: 3,
),
],
),
),
),

View file

@ -17,10 +17,6 @@ class StateMessage extends StatelessWidget {
child: Center(
child: Container(
padding: const EdgeInsets.all(8),
decoration: BoxDecoration(
color: Theme.of(context).colorScheme.surface,
borderRadius: BorderRadius.circular(AppConfig.borderRadius / 2),
),
child: Text(
event.calcLocalizedBodyFallback(
MatrixLocals(L10n.of(context)!),
@ -29,6 +25,12 @@ class StateMessage extends StatelessWidget {
style: TextStyle(
fontSize: 12 * AppConfig.fontSizeFactor,
decoration: event.redacted ? TextDecoration.lineThrough : null,
shadows: [
Shadow(
color: Theme.of(context).colorScheme.surface,
blurRadius: 3,
),
],
),
),
),

View file

@ -1,6 +1,7 @@
import 'package:fluffychat/config/themes.dart';
import 'package:flutter/material.dart';
import 'package:fluffychat/config/themes.dart';
class TwoColumnLayout extends StatelessWidget {
final Widget mainView;
final Widget sideView;