Skip to content

Commit f3353ec

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 f452053 commit f3353ec

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

lib/widgets/content.dart

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -902,17 +902,18 @@ class UserMention extends StatelessWidget {
902902
// One hopes an @-mention can't contain an embedded link.
903903
// (The parser on creating a UserMentionNode has a TODO to check that.)
904904
linkRecognizers: null,
905+
906+
// TODO(#647) when self-user is non-silently mentioned, make bold, and:
907+
// TODO(#646) when self-user is non-silently mentioned,
908+
// distinguish font color between direct and wildcard mentions
905909
style: surroundingTextStyle,
910+
906911
nodes: node.nodes));
907912
}
908913

909914
static get _kDecoration => BoxDecoration(
910-
gradient: const LinearGradient(
911-
colors: [Color.fromRGBO(0, 0, 0, 0.1), Color.fromRGBO(0, 0, 0, 0)],
912-
begin: Alignment.topCenter,
913-
end: Alignment.bottomCenter),
914-
border: Border.all(
915-
color: const Color.fromRGBO(0xcc, 0xcc, 0xcc, 1), width: 1),
915+
// TODO(#646) different background between direct and wildcard mentions
916+
color: const HSLColor.fromAHSL(0.2, 240, 0.7, 0.7).toColor(),
916917
borderRadius: const BorderRadius.all(Radius.circular(3)));
917918

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

0 commit comments

Comments
 (0)