Skip to content

Commit 74aa25d

Browse files
committed
text: Use proportionalLetterSpacing in the few existing places that want it
The letter spacings in these pieces of text hasn't been responding to system font-size adjustments. Now they do. There might not be any other instances of this problem in the app, because we widely apply 0 for [TextStyle.letterSpacing] (since 0065954), and when we do that, it shouldn't matter whether zero is considered as logical pixels or as a proportion the surrounding text size.
1 parent 0037ef1 commit 74aa25d

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

lib/widgets/message_list.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -667,7 +667,7 @@ class StreamMessageRecipientHeader extends StatelessWidget {
667667
final textStyle = TextStyle(
668668
color: contrastingColor,
669669
fontSize: 16,
670-
letterSpacing: 0.02 * 16,
670+
letterSpacing: proportionalLetterSpacing(context, 0.02, baseFontSize: 16),
671671
height: (18 / 16),
672672
).merge(weightVariableTextStyle(context, wght: 600));
673673

@@ -775,9 +775,9 @@ class DmRecipientHeader extends StatelessWidget {
775775
child: Icon(size: 16, ZulipIcons.user)),
776776
Expanded(
777777
child: Text(title,
778-
style: const TextStyle(
778+
style: TextStyle(
779779
fontSize: 16,
780-
letterSpacing: 0.02 * 16,
780+
letterSpacing: proportionalLetterSpacing(context, 0.02, baseFontSize: 16),
781781
height: (18 / 16),
782782
).merge(weightVariableTextStyle(context, wght: 600)),
783783
overflow: TextOverflow.ellipsis)),

lib/widgets/subscription_list.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ class _SubscriptionListHeader extends StatelessWidget {
148148
style: TextStyle(
149149
color: const HSLColor.fromAHSL(1.0, 240, 0.1, 0.5).toColor(),
150150
fontSize: 14,
151-
letterSpacing: 0.04 * 14,
151+
letterSpacing: proportionalLetterSpacing(context, 0.04, baseFontSize: 14),
152152
height: (16 / 14),
153153
))),
154154
const SizedBox(width: 8),

0 commit comments

Comments
 (0)