Skip to content

Commit 36ad5ac

Browse files
chrisbobbegnprice
authored andcommitted
msglist: Follow web's change making dark mode's --color-text-default opaque
In zulip/zulip@8741c9e43, web changed --color-text-default from `hsl(0deg 0% 100% / 75%)` to `hsl(0deg 0% 85%)`, to fix some bugs: - literal Unicode emoji were not fully opaque - strikethroughs appeared uneven; opacity was compounded where letters and strikethroughs overlapped. The change also made message text a little bit higher contrast, and that seems like an improvement. Discussion: https://chat.zulip.org/#narrow/stream/101-design/topic/Message.20text.20color.20in.20dark.20theme/near/1936707 To carry over this change, this commit updates ContentTheme.textStylePlainParagraph, and also all our other colors that were following web where the web counterpart was based on --color-text-default. I believe that turns out to just be MessageListTheme.messageTimestamp, added in beee77e; see that commit message. Before this, emoji in messages were not fully opaque in dark mode (#953), as Greg reported: https://chat.zulip.org/#narrow/stream/48-mobile/topic/dark.20theme/near/1924392 and that's fixed now. Fixes: #953
1 parent 945066c commit 36ad5ac

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

lib/widgets/content.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,7 @@ class ContentTheme extends ThemeExtension<ContentTheme> {
6868
colorMessageMediaContainerBackground: const HSLColor.fromAHSL(0.03, 0, 0, 1).toColor(),
6969
colorThematicBreak: const HSLColor.fromAHSL(1, 0, 0, .87).toColor().withValues(alpha: 0.2),
7070
textStylePlainParagraph: _plainParagraphCommon(context).copyWith(
71-
color: const HSLColor.fromAHSL(0.75, 0, 0, 1).toColor(),
71+
color: const HSLColor.fromAHSL(1, 0, 0, 0.85).toColor(),
7272
debugLabel: 'ContentTheme.textStylePlainParagraph'),
7373
codeBlockTextStyles: CodeBlockTextStyles.dark(context),
7474
textStyleError: TextStyle(fontSize: kBaseFontSize, color: Colors.red.shade900)

lib/widgets/message_list.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ class MessageListTheme extends ThemeExtension<MessageListTheme> {
5858
dateSeparator: Colors.white,
5959
dateSeparatorText: const HSLColor.fromAHSL(0.75, 0, 0, 1).toColor(),
6060
dmRecipientHeaderBg: const HSLColor.fromAHSL(1, 46, 0.15, 0.2).toColor(),
61-
messageTimestamp: const HSLColor.fromAHSL(0.6, 0, 0, 1).toColor(),
61+
messageTimestamp: const HSLColor.fromAHSL(0.8, 0, 0, 0.85).toColor(),
6262
recipientHeaderText: const HSLColor.fromAHSL(0.8, 0, 0, 1).toColor(),
6363
senderBotIcon: const HSLColor.fromAHSL(1, 180, 0.05, 0.5).toColor(),
6464
senderName: const HSLColor.fromAHSL(0.85, 0, 0, 1).toColor(),

0 commit comments

Comments
 (0)