chore: Follow up wallpaper configs
This commit is contained in:
parent
61b8fafaae
commit
66ea73ea18
3 changed files with 81 additions and 33 deletions
|
|
@ -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: Text(
|
child: Material(
|
||||||
event.originServerTs.localizedTime(context),
|
borderRadius:
|
||||||
style: TextStyle(
|
BorderRadius.circular(AppConfig.borderRadius * 2),
|
||||||
fontWeight: FontWeight.bold,
|
color: theme.colorScheme.surface.withAlpha(128),
|
||||||
fontSize: 12 * AppConfig.fontSizeFactor,
|
child: Padding(
|
||||||
color: theme.colorScheme.secondary,
|
padding: const EdgeInsets.symmetric(
|
||||||
|
horizontal: 8.0,
|
||||||
|
vertical: 2.0,
|
||||||
|
),
|
||||||
|
child: Text(
|
||||||
|
event.originServerTs.localizedTime(context),
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 12 * AppConfig.fontSizeFactor,
|
||||||
|
),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
|
||||||
|
|
@ -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,24 +18,35 @@ 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(
|
||||||
mainAxisSize: MainAxisSize.min,
|
padding: const EdgeInsets.only(bottom: 32.0),
|
||||||
children: [
|
child: Center(
|
||||||
Avatar(
|
child: Material(
|
||||||
mxContent: event.room.avatar,
|
color: theme.colorScheme.surface.withAlpha(128),
|
||||||
name: roomName,
|
borderRadius: BorderRadius.circular(AppConfig.borderRadius),
|
||||||
size: Avatar.defaultSize * 2,
|
child: Padding(
|
||||||
|
padding: const EdgeInsets.all(16.0),
|
||||||
|
child: Column(
|
||||||
|
mainAxisSize: MainAxisSize.min,
|
||||||
|
children: [
|
||||||
|
Avatar(
|
||||||
|
mxContent: event.room.avatar,
|
||||||
|
name: roomName,
|
||||||
|
size: Avatar.defaultSize * 2,
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
roomName,
|
||||||
|
style: theme.textTheme.headlineSmall,
|
||||||
|
),
|
||||||
|
Text(
|
||||||
|
'${event.originServerTs.localizedTime(context)} | ${l10n.countParticipants((event.room.summary.mJoinedMemberCount ?? 1) + (event.room.summary.mInvitedMemberCount ?? 0))}',
|
||||||
|
style: theme.textTheme.labelSmall,
|
||||||
|
),
|
||||||
|
],
|
||||||
|
),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
Text(
|
),
|
||||||
roomName,
|
|
||||||
style: theme.textTheme.headlineSmall,
|
|
||||||
),
|
|
||||||
Text(
|
|
||||||
'${event.originServerTs.localizedTime(context)} | ${l10n.countParticipants((event.room.summary.mJoinedMemberCount ?? 1) + (event.room.summary.mInvitedMemberCount ?? 0))}',
|
|
||||||
style: theme.textTheme.labelSmall,
|
|
||||||
),
|
|
||||||
const SizedBox(height: 48),
|
|
||||||
],
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -12,19 +12,29 @@ 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: Text(
|
child: Material(
|
||||||
event.calcLocalizedBodyFallback(
|
color: theme.colorScheme.surface.withAlpha(128),
|
||||||
MatrixLocals(L10n.of(context)),
|
borderRadius: BorderRadius.circular(AppConfig.borderRadius / 3),
|
||||||
),
|
child: Padding(
|
||||||
textAlign: TextAlign.center,
|
padding:
|
||||||
style: TextStyle(
|
const EdgeInsets.symmetric(horizontal: 8.0, vertical: 4.0),
|
||||||
fontSize: 12 * AppConfig.fontSizeFactor,
|
child: Text(
|
||||||
decoration: event.redacted ? TextDecoration.lineThrough : null,
|
event.calcLocalizedBodyFallback(
|
||||||
|
MatrixLocals(L10n.of(context)),
|
||||||
|
),
|
||||||
|
textAlign: TextAlign.center,
|
||||||
|
style: TextStyle(
|
||||||
|
fontSize: 12 * AppConfig.fontSizeFactor,
|
||||||
|
decoration:
|
||||||
|
event.redacted ? TextDecoration.lineThrough : null,
|
||||||
|
),
|
||||||
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue