chore: Follow up message bubble design
This commit is contained in:
parent
292e6c8834
commit
0387b955ed
3 changed files with 12 additions and 6 deletions
|
|
@ -64,7 +64,7 @@ abstract class AppConfig {
|
||||||
static const String emojiFontName = 'Noto Emoji';
|
static const String emojiFontName = 'Noto Emoji';
|
||||||
static const String emojiFontUrl =
|
static const String emojiFontUrl =
|
||||||
'https://github.com/googlefonts/noto-emoji/';
|
'https://github.com/googlefonts/noto-emoji/';
|
||||||
static const double borderRadius = 16.0;
|
static const double borderRadius = 18.0;
|
||||||
static const double columnWidth = 360.0;
|
static const double columnWidth = 360.0;
|
||||||
static final Uri homeserverList = Uri(
|
static final Uri homeserverList = Uri(
|
||||||
scheme: 'https',
|
scheme: 'https',
|
||||||
|
|
|
||||||
|
|
@ -101,7 +101,7 @@ class Message extends StatelessWidget {
|
||||||
|
|
||||||
final textColor = ownMessage
|
final textColor = ownMessage
|
||||||
? Theme.of(context).colorScheme.onPrimary
|
? Theme.of(context).colorScheme.onPrimary
|
||||||
: Theme.of(context).colorScheme.onSurfaceVariant;
|
: Theme.of(context).colorScheme.onBackground;
|
||||||
final rowMainAxisAlignment =
|
final rowMainAxisAlignment =
|
||||||
ownMessage ? MainAxisAlignment.end : MainAxisAlignment.start;
|
ownMessage ? MainAxisAlignment.end : MainAxisAlignment.start;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -29,9 +29,15 @@ class ReplyContent extends StatelessWidget {
|
||||||
final displayEvent =
|
final displayEvent =
|
||||||
timeline != null ? replyEvent.getDisplayEvent(timeline) : replyEvent;
|
timeline != null ? replyEvent.getDisplayEvent(timeline) : replyEvent;
|
||||||
final fontSize = AppConfig.messageFontSize * AppConfig.fontSizeFactor;
|
final fontSize = AppConfig.messageFontSize * AppConfig.fontSizeFactor;
|
||||||
|
final color = ownMessage
|
||||||
|
? Theme.of(context).colorScheme.primaryContainer
|
||||||
|
: Theme.of(context).colorScheme.primary;
|
||||||
|
|
||||||
return Material(
|
return Material(
|
||||||
color: Theme.of(context).colorScheme.background.withOpacity(0.33),
|
color: Theme.of(context)
|
||||||
|
.colorScheme
|
||||||
|
.background
|
||||||
|
.withOpacity(ownMessage ? 0.2 : 0.33),
|
||||||
borderRadius: borderRadius,
|
borderRadius: borderRadius,
|
||||||
child: Row(
|
child: Row(
|
||||||
mainAxisSize: MainAxisSize.min,
|
mainAxisSize: MainAxisSize.min,
|
||||||
|
|
@ -39,7 +45,7 @@ class ReplyContent extends StatelessWidget {
|
||||||
Container(
|
Container(
|
||||||
width: 3,
|
width: 3,
|
||||||
height: fontSize * 2 + 16,
|
height: fontSize * 2 + 16,
|
||||||
color: Theme.of(context).colorScheme.primary,
|
color: color,
|
||||||
),
|
),
|
||||||
const SizedBox(width: 6),
|
const SizedBox(width: 6),
|
||||||
Flexible(
|
Flexible(
|
||||||
|
|
@ -56,7 +62,7 @@ class ReplyContent extends StatelessWidget {
|
||||||
overflow: TextOverflow.ellipsis,
|
overflow: TextOverflow.ellipsis,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
fontWeight: FontWeight.bold,
|
fontWeight: FontWeight.bold,
|
||||||
color: Theme.of(context).colorScheme.primary,
|
color: color,
|
||||||
fontSize: fontSize,
|
fontSize: fontSize,
|
||||||
),
|
),
|
||||||
);
|
);
|
||||||
|
|
@ -72,7 +78,7 @@ class ReplyContent extends StatelessWidget {
|
||||||
maxLines: 1,
|
maxLines: 1,
|
||||||
style: TextStyle(
|
style: TextStyle(
|
||||||
color: ownMessage
|
color: ownMessage
|
||||||
? Theme.of(context).colorScheme.onPrimaryContainer
|
? Theme.of(context).colorScheme.onPrimary
|
||||||
: Theme.of(context).colorScheme.onBackground,
|
: Theme.of(context).colorScheme.onBackground,
|
||||||
fontSize: fontSize,
|
fontSize: fontSize,
|
||||||
),
|
),
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue