chore: Nicer background for sate message and time in chat

pull/1248/head
krille-chan 1 year ago
parent 3434741bc5
commit 30e3a4f2ff
No known key found for this signature in database

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

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

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

Loading…
Cancel
Save