@@ -568,7 +568,11 @@ class StreamMessageRecipientHeader extends StatelessWidget {
568
568
}
569
569
final textStyle = TextStyle (
570
570
color: contrastingColor,
571
- );
571
+ fontFamily: 'Source Sans 3' ,
572
+ fontSize: 16 ,
573
+ letterSpacing: 0.02 * 16 ,
574
+ height: (18 / 16 ),
575
+ ).merge (weightVariableTextStyle (context, wght: 600 , wghtIfPlatformRequestsBold: 900 ));
572
576
573
577
final Widget streamWidget;
574
578
if (! showStream) {
@@ -581,18 +585,25 @@ class StreamMessageRecipientHeader extends StatelessWidget {
581
585
onTap: () => Navigator .push (context,
582
586
MessageListPage .buildRoute (context: context,
583
587
narrow: StreamNarrow (message.streamId))),
584
- child: Row (children: [
585
- const SizedBox (width: 16 ),
586
- // TODO globe/lock icons for web-public and private streams
587
- Text (streamName, style: textStyle),
588
- Padding (
589
- // Figma has 5px horizontal padding around an 8px wide icon.
590
- // Icon is 16px wide here so horizontal padding is 1px.
591
- padding: const EdgeInsets .symmetric (horizontal: 1 ),
592
- child: Icon (size: 16 ,
593
- color: contrastingColor.withOpacity (0.6 ),
594
- ZulipIcons .chevron_right)),
595
- ]));
588
+ child: Row (
589
+ crossAxisAlignment: CrossAxisAlignment .center,
590
+ children: [
591
+ const SizedBox (width: 16 ),
592
+ // TODO globe/lock icons for web-public and private streams
593
+ Padding (
594
+ padding: const EdgeInsets .symmetric (vertical: 11 ),
595
+ child: Text (streamName,
596
+ style: textStyle,
597
+ overflow: TextOverflow .ellipsis),
598
+ ),
599
+ Padding (
600
+ // Figma has 5px horizontal padding around an 8px wide icon.
601
+ // Icon is 16px wide here so horizontal padding is 1px.
602
+ padding: const EdgeInsets .symmetric (horizontal: 1 ),
603
+ child: Icon (size: 16 ,
604
+ color: contrastingColor.withOpacity (0.6 ),
605
+ ZulipIcons .chevron_right)),
606
+ ]));
596
607
}
597
608
598
609
return GestureDetector (
@@ -601,23 +612,24 @@ class StreamMessageRecipientHeader extends StatelessWidget {
601
612
narrow: TopicNarrow .ofMessage (message))),
602
613
child: ColoredBox (
603
614
color: backgroundColor,
604
- child: Row (mainAxisAlignment: MainAxisAlignment .start, children: [
605
- // TODO(#282): Long stream name will break layout; find a fix.
606
- streamWidget,
607
- Expanded (
608
- child: Padding (
609
- // Web has padding 9, 3, 3, 2 here; but 5px is the chevron.
610
- padding: const EdgeInsets .fromLTRB (4 , 3 , 3 , 2 ),
611
- child: Text (topic,
612
- // TODO: Give a way to see the whole topic (maybe a
613
- // long-press interaction?)
614
- style: textStyle,
615
- overflow: TextOverflow .ellipsis))),
616
- // TODO topic links?
617
- // Then web also has edit/resolve/mute buttons. Skip those for mobile.
618
- RecipientHeaderDate (message: message,
619
- color: contrastingColor.withOpacity (0.4 )),
620
- ])));
615
+ child: Row (
616
+ crossAxisAlignment: CrossAxisAlignment .center,
617
+ children: [
618
+ // TODO(#282): Long stream name will break layout; find a fix.
619
+ streamWidget,
620
+ Expanded (
621
+ child: Padding (
622
+ padding: const EdgeInsets .symmetric (vertical: 11 ),
623
+ child: Text (topic,
624
+ // TODO: Give a way to see the whole topic (maybe a
625
+ // long-press interaction?)
626
+ style: textStyle,
627
+ overflow: TextOverflow .ellipsis))),
628
+ // TODO topic links?
629
+ // Then web also has edit/resolve/mute buttons. Skip those for mobile.
630
+ RecipientHeaderDate (message: message,
631
+ color: contrastingColor.withOpacity (0.4 )),
632
+ ])));
621
633
}
622
634
}
623
635
@@ -678,7 +690,10 @@ class RecipientHeaderDate extends StatelessWidget {
678
690
color: color,
679
691
fontFamily: 'Source Sans 3' ,
680
692
fontSize: 16 ,
681
- height: (19 / 16 ),
693
+ // In Figma this has a line-height of 19, but using 18
694
+ // here to match the stream/topic text widgets helps
695
+ // to align all the text to the same baseline.
696
+ height: (18 / 16 ),
682
697
// This is equivalent to css `all-small-caps`, see:
683
698
// https://developer.mozilla.org/en-US/docs/Web/CSS/font-variant-caps#all-small-caps
684
699
fontFeatures: const [FontFeature .enable ('c2sc' ), FontFeature .enable ('smcp' )],
0 commit comments