From d0090ad8d3ef92b5d5a6b7a459ade822a49128bf Mon Sep 17 00:00:00 2001 From: krille-chan Date: Sat, 27 Jan 2024 11:07:07 +0100 Subject: [PATCH] chore: Adjust status msg design --- lib/pages/chat_list/status_msg_list.dart | 94 ++++++++++++------------ 1 file changed, 48 insertions(+), 46 deletions(-) diff --git a/lib/pages/chat_list/status_msg_list.dart b/lib/pages/chat_list/status_msg_list.dart index 68bd9f26a..38eab28d0 100644 --- a/lib/pages/chat_list/status_msg_list.dart +++ b/lib/pages/chat_list/status_msg_list.dart @@ -125,7 +125,7 @@ class PresenceAvatar extends StatelessWidget { final statusMsgBubbleElevation = Theme.of(context).appBarTheme.scrolledUnderElevation ?? 4; final statusMsgBubbleShadowColor = - Theme.of(context).appBarTheme.shadowColor; + Theme.of(context).colorScheme.onBackground; final statusMsgBubbleColor = Colors.white.withAlpha(245); return Padding( padding: const EdgeInsets.symmetric(horizontal: 8.0), @@ -187,53 +187,55 @@ class PresenceAvatar extends StatelessWidget { left: 0, top: 0, right: 8, - child: Column( - mainAxisSize: MainAxisSize.min, - crossAxisAlignment: - CrossAxisAlignment.stretch, - children: [ - Material( - elevation: statusMsgBubbleElevation, - shadowColor: statusMsgBubbleShadowColor, - borderRadius: BorderRadius.circular( - AppConfig.borderRadius / 2, - ), - color: statusMsgBubbleColor, - child: Padding( - padding: const EdgeInsets.all(2.0), - child: Text( - statusMsg, - 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, - ), - child: Center( - child: SizedBox( - width: 12, - height: 12, - child: Material( - elevation: - statusMsgBubbleElevation, - shadowColor: - statusMsgBubbleShadowColor, - borderRadius: - BorderRadius.circular(99), - color: statusMsgBubbleColor, - ), - ), + child: Material( + elevation: statusMsgBubbleElevation, + shadowColor: statusMsgBubbleShadowColor, + borderRadius: BorderRadius.circular( + AppConfig.borderRadius / 2, + ), + color: statusMsgBubbleColor, + child: Padding( + padding: const EdgeInsets.all(2.0), + child: Text( + statusMsg, + maxLines: 2, + overflow: TextOverflow.ellipsis, + style: const TextStyle( + color: Colors.black, + fontSize: 10.5, ), ), - ], + ), + ), + ), + Positioned( + left: 8, + top: 32, + child: Material( + elevation: statusMsgBubbleElevation, + shadowColor: statusMsgBubbleShadowColor, + borderRadius: BorderRadius.circular( + AppConfig.borderRadius / 2, + ), + child: const SizedBox( + width: 8, + height: 8, + ), + ), + ), + Positioned( + left: 14, + top: 40, + child: Material( + elevation: statusMsgBubbleElevation, + shadowColor: statusMsgBubbleShadowColor, + borderRadius: BorderRadius.circular( + AppConfig.borderRadius / 2, + ), + child: const SizedBox( + width: 4, + height: 4, + ), ), ), ],