Skip to content

Commit 57a3bc4

Browse files
committed
content: Style @-mention pills with 2023+ direct-mention style background
As the TODO comments say, there's more we have to do to bring this up-to-date with the new, 2023+ design. But now at least we've removed a style that doesn't appear at all in that new design, and we're left with something we can make a dark-theme variant for by straightforwardly checking what web does.
1 parent 334f205 commit 57a3bc4

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

lib/widgets/content.dart

+7-6
Original file line numberDiff line numberDiff line change
@@ -820,17 +820,18 @@ class UserMention extends StatelessWidget {
820820
// One hopes an @-mention can't contain an embedded link.
821821
// (The parser on creating a UserMentionNode has a TODO to check that.)
822822
linkRecognizers: null,
823+
824+
// TODO(#647) when self-user is non-silently mentioned, make bold, and:
825+
// TODO(#646) when self-user is non-silently mentioned,
826+
// differ font color between direct and wildcard mentions
823827
style: surroundingTextStyle,
828+
824829
nodes: node.nodes));
825830
}
826831

827832
static get _kDecoration => BoxDecoration(
828-
gradient: const LinearGradient(
829-
colors: [Color.fromRGBO(0, 0, 0, 0.1), Color.fromRGBO(0, 0, 0, 0)],
830-
begin: Alignment.topCenter,
831-
end: Alignment.bottomCenter),
832-
border: Border.all(
833-
color: const Color.fromRGBO(0xcc, 0xcc, 0xcc, 1), width: 1),
833+
// TODO(#646) different background between direct and wildcard mentions
834+
color: const HSLColor.fromAHSL(0.2, 240, 0.7, 0.7).toColor(),
834835
borderRadius: const BorderRadius.all(Radius.circular(3)));
835836

836837
// This is a more literal translation of Zulip web's CSS.

0 commit comments

Comments
 (0)