@@ -665,12 +665,6 @@ class StreamMessageRecipientHeader extends StatelessWidget {
665
665
backgroundColor = _kUnsubscribedStreamRecipientHeaderColor;
666
666
iconColor = Colors .black;
667
667
}
668
- final textStyle = TextStyle (
669
- color: _kRecipientHeaderTextColor,
670
- fontSize: 16 ,
671
- letterSpacing: proportionalLetterSpacing (context, 0.02 , baseFontSize: 16 ),
672
- height: (18 / 16 ),
673
- ).merge (weightVariableTextStyle (context, wght: 600 ));
674
668
675
669
final Widget streamWidget;
676
670
if (! showStream) {
@@ -699,7 +693,7 @@ class StreamMessageRecipientHeader extends StatelessWidget {
699
693
Padding (
700
694
padding: const EdgeInsets .symmetric (vertical: 11 ),
701
695
child: Text (streamName,
702
- style: textStyle ,
696
+ style: recipientHeaderTextStyle (context) ,
703
697
overflow: TextOverflow .ellipsis),
704
698
),
705
699
Padding (
@@ -730,7 +724,7 @@ class StreamMessageRecipientHeader extends StatelessWidget {
730
724
// TODO: Give a way to see the whole topic (maybe a
731
725
// long-press interaction?)
732
726
overflow: TextOverflow .ellipsis,
733
- style: textStyle ))),
727
+ style: recipientHeaderTextStyle (context) ))),
734
728
// TODO topic links?
735
729
// Then web also has edit/resolve/mute buttons. Skip those for mobile.
736
730
RecipientHeaderDate (message: message,
@@ -776,12 +770,7 @@ class DmRecipientHeader extends StatelessWidget {
776
770
child: Icon (size: 16 , ZulipIcons .user)),
777
771
Expanded (
778
772
child: Text (title,
779
- style: TextStyle (
780
- color: _kRecipientHeaderTextColor,
781
- fontSize: 16 ,
782
- letterSpacing: proportionalLetterSpacing (context, 0.02 , baseFontSize: 16 ),
783
- height: (18 / 16 ),
784
- ).merge (weightVariableTextStyle (context, wght: 600 )),
773
+ style: recipientHeaderTextStyle (context),
785
774
overflow: TextOverflow .ellipsis)),
786
775
RecipientHeaderDate (message: message,
787
776
color: _kDmRecipientHeaderDateColor),
@@ -795,6 +784,14 @@ class DmRecipientHeader extends StatelessWidget {
795
784
final _kDmRecipientHeaderColor = const HSLColor .fromAHSL (1 , 46 , 0.35 , 0.93 ).toColor ();
796
785
final _kDmRecipientHeaderDateColor = Colors .black.withOpacity (0.4 );
797
786
787
+ TextStyle recipientHeaderTextStyle (BuildContext context) {
788
+ return TextStyle (
789
+ color: _kRecipientHeaderTextColor,
790
+ fontSize: 16 ,
791
+ letterSpacing: proportionalLetterSpacing (context, 0.02 , baseFontSize: 16 ),
792
+ height: (18 / 16 ),
793
+ ).merge (weightVariableTextStyle (context, wght: 600 ));
794
+ }
798
795
final _kRecipientHeaderTextColor = const HSLColor .fromAHSL (1 , 0 , 0 , 0.15 ).toColor ();
799
796
800
797
class RecipientHeaderDate extends StatelessWidget {
0 commit comments