Skip to content

Commit 7e24221

Browse files
committed
msglist: Update chevron design in StreamMessageRecipientHeader
Switch from colored background with chevron shaped border to inline chevron icon.
1 parent b86068a commit 7e24221

File tree

1 file changed

+16
-7
lines changed

1 file changed

+16
-7
lines changed

lib/widgets/message_list.dart

+16-7
Original file line numberDiff line numberDiff line change
@@ -552,13 +552,15 @@ class StreamMessageRecipientHeader extends StatelessWidget {
552552
final store = PerAccountStoreWidget.of(context);
553553

554554
final topic = message.subject;
555-
556555
final subscription = store.subscriptions[message.streamId];
557556
final streamColor = Color(subscription?.color ?? 0x00c2c2c2);
558557
final contrastingColor =
559558
ThemeData.estimateBrightnessForColor(streamColor) == Brightness.dark
560559
? Colors.white
561560
: Colors.black;
561+
final textStyle = TextStyle(
562+
color: contrastingColor,
563+
);
562564

563565
final Widget streamWidget;
564566
if (!showStream) {
@@ -571,11 +573,18 @@ class StreamMessageRecipientHeader extends StatelessWidget {
571573
onTap: () => Navigator.push(context,
572574
MessageListPage.buildRoute(context: context,
573575
narrow: StreamNarrow(message.streamId))),
574-
child: RecipientHeaderChevronContainer(
575-
color: streamColor,
576+
child: Row(children: [
577+
const SizedBox(width: 16),
576578
// TODO globe/lock icons for web-public and private streams
577-
child: Text(streamName,
578-
style: TextStyle(color: contrastingColor))));
579+
Text(streamName, style: textStyle),
580+
Padding(
581+
// Figma has 5px horizontal padding around an 8px wide icon.
582+
// Icon is 16px wide here so horizontal padding is 1px.
583+
padding: const EdgeInsets.symmetric(horizontal: 1),
584+
child: Icon(size: 16,
585+
color: contrastingColor.withOpacity(0.6),
586+
ZulipIcons.chevron_right)),
587+
]));
579588
}
580589

581590
return GestureDetector(
@@ -594,8 +603,8 @@ class StreamMessageRecipientHeader extends StatelessWidget {
594603
child: Text(topic,
595604
// TODO: Give a way to see the whole topic (maybe a
596605
// long-press interaction?)
597-
overflow: TextOverflow.ellipsis,
598-
style: const TextStyle(fontWeight: FontWeight.w600)))),
606+
style: textStyle,
607+
overflow: TextOverflow.ellipsis))),
599608
// TODO topic links?
600609
// Then web also has edit/resolve/mute buttons. Skip those for mobile.
601610
RecipientHeaderDate(message: message,

0 commit comments

Comments
 (0)