Skip to content

Commit

Permalink
msglist: Move star icon 2px away from the edge of the screen
Browse files Browse the repository at this point in the history
Fixes: zulip#1247
  • Loading branch information
lakshya1goel committed Jan 3, 2025
1 parent c02d947 commit ca079f2
Showing 1 changed file with 30 additions and 25 deletions.
55 changes: 30 additions & 25 deletions lib/widgets/message_list.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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,
),
),
])
])));
}
}
Expand Down

0 comments on commit ca079f2

Please sign in to comment.