From 8f5dbc75c98a021fc01c9437ae272db5ec16f211 Mon Sep 17 00:00:00 2001 From: krille-chan Date: Tue, 4 Feb 2025 21:39:38 +0100 Subject: [PATCH] chore: Follow up colors --- lib/pages/chat_list/chat_list_item.dart | 38 ++++++++++++------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/lib/pages/chat_list/chat_list_item.dart b/lib/pages/chat_list/chat_list_item.dart index d6a55c05c..11961aada 100644 --- a/lib/pages/chat_list/chat_list_item.dart +++ b/lib/pages/chat_list/chat_list_item.dart @@ -259,6 +259,7 @@ class ChatListItem extends StatelessWidget { ], ), subtitle: Row( + crossAxisAlignment: CrossAxisAlignment.start, mainAxisAlignment: MainAxisAlignment.center, children: [ if (typingText.isEmpty && @@ -363,6 +364,7 @@ class ChatListItem extends StatelessWidget { AnimatedContainer( duration: FluffyThemes.animationDuration, curve: FluffyThemes.animationCurve, + alignment: Alignment.center, padding: const EdgeInsets.symmetric(horizontal: 7), height: unreadBubbleSize, width: @@ -374,29 +376,27 @@ class ChatListItem extends StatelessWidget { decoration: BoxDecoration( color: room.highlightCount > 0 || room.membership == Membership.invite - ? Colors.red + ? theme.colorScheme.error : hasNotifications || room.markedUnread ? theme.colorScheme.primary : theme.colorScheme.primaryContainer, - borderRadius: - BorderRadius.circular(AppConfig.borderRadius), - ), - child: Center( - child: hasNotifications - ? Text( - room.notificationCount.toString(), - style: TextStyle( - color: room.highlightCount > 0 - ? Colors.white - : hasNotifications - ? theme.colorScheme.onPrimary - : theme - .colorScheme.onPrimaryContainer, - fontSize: 13, - ), - ) - : const SizedBox.shrink(), + borderRadius: BorderRadius.circular(7), ), + child: hasNotifications + ? Text( + room.notificationCount.toString(), + style: TextStyle( + color: room.highlightCount > 0 + ? Colors.white + : hasNotifications + ? theme.colorScheme.onPrimary + : theme.colorScheme.onPrimaryContainer, + fontSize: 13, + fontWeight: FontWeight.w500, + ), + textAlign: TextAlign.center, + ) + : const SizedBox.shrink(), ), ], ),