From ca079f2db09ebdc9437545d875f467be506590c3 Mon Sep 17 00:00:00 2001 From: lakshya1goel Date: Fri, 3 Jan 2025 09:29:27 +0530 Subject: [PATCH] msglist: Move star icon 2px away from the edge of the screen Fixes: #1247 --- lib/widgets/message_list.dart | 55 +++++++++++++++++++---------------- 1 file changed, 30 insertions(+), 25 deletions(-) diff --git a/lib/widgets/message_list.dart b/lib/widgets/message_list.dart index 8c32a12115..124cfe53b7 100644 --- a/lib/widgets/message_list.dart +++ b/lib/widgets/message_list.dart @@ -1354,32 +1354,37 @@ class MessageWithPossibleSender extends StatelessWidget { if (senderRow != null) Padding(padding: const EdgeInsets.fromLTRB(16, 2, 16, 0), child: senderRow), - Row( - crossAxisAlignment: CrossAxisAlignment.baseline, - textBaseline: localizedTextBaseline(context), + Stack( children: [ - const SizedBox(width: 16), - Expanded(child: Column( - crossAxisAlignment: CrossAxisAlignment.stretch, - children: [ - MessageContent(message: message, content: item.content), - if ((message.reactions?.total ?? 0) > 0) - ReactionChipsList(messageId: message.id, reactions: message.reactions!), - if (editStateText != null) - Text(editStateText, - textAlign: TextAlign.end, - style: TextStyle( - color: designVariables.labelEdited, - fontSize: 12, - height: (12 / 12), - letterSpacing: proportionalLetterSpacing( - context, 0.05, baseFontSize: 12))), - ])), - SizedBox(width: 16, - child: message.flags.contains(MessageFlag.starred) - ? Icon(ZulipIcons.star_filled, size: 16, color: designVariables.star) - : null), - ]), + Padding( + padding: const EdgeInsets.symmetric(horizontal: 16), + child: Column( + crossAxisAlignment: CrossAxisAlignment.stretch, + children: [ + MessageContent(message: message, content: item.content), + if ((message.reactions?.total ?? 0) > 0) + ReactionChipsList(messageId: message.id, reactions: message.reactions!), + if (editStateText != null) + Text(editStateText, + textAlign: TextAlign.end, + style: TextStyle( + color: designVariables.labelEdited, + fontSize: 12, + height: (12 / 12), + letterSpacing: proportionalLetterSpacing( + context, 0.05, baseFontSize: 12))), + ])), + if (message.flags.contains(MessageFlag.starred)) + Positioned( + top: 4, + right: 2, + child: Icon( + ZulipIcons.star_filled, + size: 16, + color: designVariables.star, + ), + ), + ]) ]))); } }