Skip to content

Commit d6e1715

Browse files
committed
poll [nfc]: Leave font size to the users of the bold text style
This makes it easier to follow font sizes of UI elements in this widget. We leave textStyleVoterNames as-is because we never need to override the font size. Signed-off-by: Zixuan James Li <[email protected]>
1 parent 70d12a4 commit d6e1715

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

lib/widgets/poll.dart

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -50,15 +50,14 @@ class _PollWidgetState extends State<PollWidget> {
5050
final theme = ContentTheme.of(context);
5151
final store = PerAccountStoreWidget.of(context);
5252

53-
final textStyleBold = const TextStyle(fontSize: 18)
54-
.merge(weightVariableTextStyle(context, wght: 600));
53+
final textStyleBold = weightVariableTextStyle(context, wght: 600);
5554
final textStyleVoterNames = TextStyle(
5655
fontSize: 16, color: theme.colorPollNames);
5756

5857
Text question = (widget.poll.question.isNotEmpty)
59-
? Text(widget.poll.question, style: textStyleBold)
58+
? Text(widget.poll.question, style: textStyleBold.copyWith(fontSize: 18))
6059
: Text(zulipLocalizations.pollWidgetQuestionMissing,
61-
style: textStyleBold.copyWith(fontStyle: FontStyle.italic));
60+
style: textStyleBold.copyWith(fontSize: 18, fontStyle: FontStyle.italic));
6261

6362
Widget buildOptionItem(PollOption option) {
6463
// TODO(i18n): List formatting, like you can do in JavaScript:

0 commit comments

Comments
 (0)