chore: Follow up wallpaper configs

This commit is contained in:
krille-chan 2024-11-01 11:59:08 +01:00
commit 66ea73ea18
No known key found for this signature in database
3 changed files with 81 additions and 33 deletions

View file

@ -265,6 +265,23 @@ class Message extends StatelessWidget {
? displayname.color ? displayname.color
: displayname : displayname
.lightColorText), .lightColorText),
shadows:
avatarPresenceBackgroundColor ==
null
? null
: [
Shadow(
offset:
const Offset(
0.0,
0.0,
),
blurRadius: 5,
color: theme
.colorScheme
.surface,
),
],
), ),
maxLines: 1, maxLines: 1,
overflow: TextOverflow.ellipsis, overflow: TextOverflow.ellipsis,
@ -443,12 +460,21 @@ class Message extends StatelessWidget {
child: Center( child: Center(
child: Padding( child: Padding(
padding: const EdgeInsets.only(top: 4.0), padding: const EdgeInsets.only(top: 4.0),
child: Material(
borderRadius:
BorderRadius.circular(AppConfig.borderRadius * 2),
color: theme.colorScheme.surface.withAlpha(128),
child: Padding(
padding: const EdgeInsets.symmetric(
horizontal: 8.0,
vertical: 2.0,
),
child: Text( child: Text(
event.originServerTs.localizedTime(context), event.originServerTs.localizedTime(context),
style: TextStyle( style: TextStyle(
fontWeight: FontWeight.bold,
fontSize: 12 * AppConfig.fontSizeFactor, fontSize: 12 * AppConfig.fontSizeFactor,
color: theme.colorScheme.secondary, ),
),
), ),
), ),
), ),

View file

@ -3,6 +3,7 @@ import 'package:flutter/material.dart';
import 'package:flutter_gen/gen_l10n/l10n.dart'; import 'package:flutter_gen/gen_l10n/l10n.dart';
import 'package:matrix/matrix.dart'; import 'package:matrix/matrix.dart';
import 'package:fluffychat/config/app_config.dart';
import 'package:fluffychat/utils/date_time_extension.dart'; import 'package:fluffychat/utils/date_time_extension.dart';
import 'package:fluffychat/utils/matrix_sdk_extensions/matrix_locals.dart'; import 'package:fluffychat/utils/matrix_sdk_extensions/matrix_locals.dart';
import 'package:fluffychat/widgets/avatar.dart'; import 'package:fluffychat/widgets/avatar.dart';
@ -17,7 +18,15 @@ class RoomCreationStateEvent extends StatelessWidget {
final matrixLocals = MatrixLocals(l10n); final matrixLocals = MatrixLocals(l10n);
final theme = Theme.of(context); final theme = Theme.of(context);
final roomName = event.room.getLocalizedDisplayname(matrixLocals); final roomName = event.room.getLocalizedDisplayname(matrixLocals);
return Column( return Padding(
padding: const EdgeInsets.only(bottom: 32.0),
child: Center(
child: Material(
color: theme.colorScheme.surface.withAlpha(128),
borderRadius: BorderRadius.circular(AppConfig.borderRadius),
child: Padding(
padding: const EdgeInsets.all(16.0),
child: Column(
mainAxisSize: MainAxisSize.min, mainAxisSize: MainAxisSize.min,
children: [ children: [
Avatar( Avatar(
@ -33,8 +42,11 @@ class RoomCreationStateEvent extends StatelessWidget {
'${event.originServerTs.localizedTime(context)} | ${l10n.countParticipants((event.room.summary.mJoinedMemberCount ?? 1) + (event.room.summary.mInvitedMemberCount ?? 0))}', '${event.originServerTs.localizedTime(context)} | ${l10n.countParticipants((event.room.summary.mJoinedMemberCount ?? 1) + (event.room.summary.mInvitedMemberCount ?? 0))}',
style: theme.textTheme.labelSmall, style: theme.textTheme.labelSmall,
), ),
const SizedBox(height: 48),
], ],
),
),
),
),
); );
} }
} }

View file

@ -12,11 +12,18 @@ class StateMessage extends StatelessWidget {
@override @override
Widget build(BuildContext context) { Widget build(BuildContext context) {
final theme = Theme.of(context);
return Padding( return Padding(
padding: const EdgeInsets.symmetric(horizontal: 8.0), padding: const EdgeInsets.symmetric(horizontal: 8.0),
child: Center( child: Center(
child: Container( child: Padding(
padding: const EdgeInsets.all(8), padding: const EdgeInsets.all(4),
child: Material(
color: theme.colorScheme.surface.withAlpha(128),
borderRadius: BorderRadius.circular(AppConfig.borderRadius / 3),
child: Padding(
padding:
const EdgeInsets.symmetric(horizontal: 8.0, vertical: 4.0),
child: Text( child: Text(
event.calcLocalizedBodyFallback( event.calcLocalizedBodyFallback(
MatrixLocals(L10n.of(context)), MatrixLocals(L10n.of(context)),
@ -24,7 +31,10 @@ class StateMessage extends StatelessWidget {
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: TextStyle( style: TextStyle(
fontSize: 12 * AppConfig.fontSizeFactor, fontSize: 12 * AppConfig.fontSizeFactor,
decoration: event.redacted ? TextDecoration.lineThrough : null, decoration:
event.redacted ? TextDecoration.lineThrough : null,
),
),
), ),
), ),
), ),