chore: Adjust status msg design

This commit is contained in:
krille-chan 2024-01-27 11:07:07 +01:00
commit d0090ad8d3
No known key found for this signature in database

View file

@ -125,7 +125,7 @@ class PresenceAvatar extends StatelessWidget {
final statusMsgBubbleElevation = final statusMsgBubbleElevation =
Theme.of(context).appBarTheme.scrolledUnderElevation ?? 4; Theme.of(context).appBarTheme.scrolledUnderElevation ?? 4;
final statusMsgBubbleShadowColor = final statusMsgBubbleShadowColor =
Theme.of(context).appBarTheme.shadowColor; Theme.of(context).colorScheme.onBackground;
final statusMsgBubbleColor = Colors.white.withAlpha(245); final statusMsgBubbleColor = Colors.white.withAlpha(245);
return Padding( return Padding(
padding: const EdgeInsets.symmetric(horizontal: 8.0), padding: const EdgeInsets.symmetric(horizontal: 8.0),
@ -187,53 +187,55 @@ class PresenceAvatar extends StatelessWidget {
left: 0, left: 0,
top: 0, top: 0,
right: 8, right: 8,
child: Column( child: Material(
mainAxisSize: MainAxisSize.min, elevation: statusMsgBubbleElevation,
crossAxisAlignment: shadowColor: statusMsgBubbleShadowColor,
CrossAxisAlignment.stretch, borderRadius: BorderRadius.circular(
children: [ AppConfig.borderRadius / 2,
Material( ),
elevation: statusMsgBubbleElevation, color: statusMsgBubbleColor,
shadowColor: statusMsgBubbleShadowColor, child: Padding(
borderRadius: BorderRadius.circular( padding: const EdgeInsets.all(2.0),
AppConfig.borderRadius / 2, child: Text(
), statusMsg,
color: statusMsgBubbleColor, maxLines: 2,
child: Padding( overflow: TextOverflow.ellipsis,
padding: const EdgeInsets.all(2.0), style: const TextStyle(
child: Text( color: Colors.black,
statusMsg, fontSize: 10.5,
maxLines: 2,
overflow: TextOverflow.ellipsis,
style: const TextStyle(
color: Colors.black,
fontSize: 10.5,
),
),
), ),
), ),
Padding( ),
padding: const EdgeInsets.only( ),
left: 26.0, ),
top: 4.0, Positioned(
), left: 8,
child: Center( top: 32,
child: SizedBox( child: Material(
width: 12, elevation: statusMsgBubbleElevation,
height: 12, shadowColor: statusMsgBubbleShadowColor,
child: Material( borderRadius: BorderRadius.circular(
elevation: AppConfig.borderRadius / 2,
statusMsgBubbleElevation, ),
shadowColor: child: const SizedBox(
statusMsgBubbleShadowColor, width: 8,
borderRadius: height: 8,
BorderRadius.circular(99), ),
color: statusMsgBubbleColor, ),
), ),
), Positioned(
), left: 14,
), top: 40,
], child: Material(
elevation: statusMsgBubbleElevation,
shadowColor: statusMsgBubbleShadowColor,
borderRadius: BorderRadius.circular(
AppConfig.borderRadius / 2,
),
child: const SizedBox(
width: 4,
height: 4,
),
), ),
), ),
], ],