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