@@ -40,6 +40,7 @@ class ContentTheme extends ThemeExtension<ContentTheme> {
40
40
return ContentTheme ._(
41
41
colorCodeBlockBackground: const HSLColor .fromAHSL (0.04 , 0 , 0 , 0 ).toColor (),
42
42
colorDirectMentionBackground: const HSLColor .fromAHSL (0.2 , 240 , 0.7 , 0.7 ).toColor (),
43
+ colorTopicMentionBackground: const HSLColor .fromAHSL (0.18 , 183 , 0.6 , 0.45 ).toColor (),
43
44
colorGlobalTimeBackground: const HSLColor .fromAHSL (1 , 0 , 0 , 0.93 ).toColor (),
44
45
colorGlobalTimeBorder: const HSLColor .fromAHSL (1 , 0 , 0 , 0.8 ).toColor (),
45
46
colorMathBlockBorder: const HSLColor .fromAHSL (0.15 , 240 , 0.8 , 0.5 ).toColor (),
@@ -73,6 +74,7 @@ class ContentTheme extends ThemeExtension<ContentTheme> {
73
74
return ContentTheme ._(
74
75
colorCodeBlockBackground: const HSLColor .fromAHSL (0.04 , 0 , 0 , 1 ).toColor (),
75
76
colorDirectMentionBackground: const HSLColor .fromAHSL (0.25 , 240 , 0.52 , 0.6 ).toColor (),
77
+ colorTopicMentionBackground: const HSLColor .fromAHSL (0.18 , 183 , 0.52 , 0.40 ).toColor (),
76
78
colorGlobalTimeBackground: const HSLColor .fromAHSL (0.2 , 0 , 0 , 0 ).toColor (),
77
79
colorGlobalTimeBorder: const HSLColor .fromAHSL (0.4 , 0 , 0 , 0 ).toColor (),
78
80
colorMathBlockBorder: const HSLColor .fromAHSL (1 , 240 , 0.4 , 0.4 ).toColor (),
@@ -105,6 +107,7 @@ class ContentTheme extends ThemeExtension<ContentTheme> {
105
107
ContentTheme ._({
106
108
required this .colorCodeBlockBackground,
107
109
required this .colorDirectMentionBackground,
110
+ required this .colorTopicMentionBackground,
108
111
required this .colorGlobalTimeBackground,
109
112
required this .colorGlobalTimeBorder,
110
113
required this .colorMathBlockBorder,
@@ -137,6 +140,7 @@ class ContentTheme extends ThemeExtension<ContentTheme> {
137
140
138
141
final Color colorCodeBlockBackground;
139
142
final Color colorDirectMentionBackground;
143
+ final Color colorTopicMentionBackground;
140
144
final Color colorGlobalTimeBackground;
141
145
final Color colorGlobalTimeBorder;
142
146
final Color colorMathBlockBorder; // TODO(#46) this won't be needed
@@ -197,6 +201,7 @@ class ContentTheme extends ThemeExtension<ContentTheme> {
197
201
ContentTheme copyWith ({
198
202
Color ? colorCodeBlockBackground,
199
203
Color ? colorDirectMentionBackground,
204
+ Color ? colorTopicMentionBackground,
200
205
Color ? colorGlobalTimeBackground,
201
206
Color ? colorGlobalTimeBorder,
202
207
Color ? colorMathBlockBorder,
@@ -219,6 +224,7 @@ class ContentTheme extends ThemeExtension<ContentTheme> {
219
224
return ContentTheme ._(
220
225
colorCodeBlockBackground: colorCodeBlockBackground ?? this .colorCodeBlockBackground,
221
226
colorDirectMentionBackground: colorDirectMentionBackground ?? this .colorDirectMentionBackground,
227
+ colorTopicMentionBackground: colorTopicMentionBackground ?? this .colorTopicMentionBackground,
222
228
colorGlobalTimeBackground: colorGlobalTimeBackground ?? this .colorGlobalTimeBackground,
223
229
colorGlobalTimeBorder: colorGlobalTimeBorder ?? this .colorGlobalTimeBorder,
224
230
colorMathBlockBorder: colorMathBlockBorder ?? this .colorMathBlockBorder,
@@ -248,6 +254,7 @@ class ContentTheme extends ThemeExtension<ContentTheme> {
248
254
return ContentTheme ._(
249
255
colorCodeBlockBackground: Color .lerp (colorCodeBlockBackground, other.colorCodeBlockBackground, t)! ,
250
256
colorDirectMentionBackground: Color .lerp (colorDirectMentionBackground, other.colorDirectMentionBackground, t)! ,
257
+ colorTopicMentionBackground: Color .lerp (colorTopicMentionBackground, other.colorTopicMentionBackground, t)! ,
251
258
colorGlobalTimeBackground: Color .lerp (colorGlobalTimeBackground, other.colorGlobalTimeBackground, t)! ,
252
259
colorGlobalTimeBorder: Color .lerp (colorGlobalTimeBorder, other.colorGlobalTimeBorder, t)! ,
253
260
colorMathBlockBorder: Color .lerp (colorMathBlockBorder, other.colorMathBlockBorder, t)! ,
@@ -1133,7 +1140,10 @@ class Mention extends StatelessWidget {
1133
1140
return Container (
1134
1141
decoration: BoxDecoration (
1135
1142
// TODO(#646) different for wildcard mentions
1136
- color: contentTheme.colorDirectMentionBackground,
1143
+ color: switch (node) {
1144
+ UserMentionNode () => contentTheme.colorDirectMentionBackground,
1145
+ TopicMentionNode () => contentTheme.colorTopicMentionBackground,
1146
+ },
1137
1147
borderRadius: const BorderRadius .all (Radius .circular (3 ))),
1138
1148
padding: const EdgeInsets .symmetric (horizontal: 0.2 * kBaseFontSize),
1139
1149
child: InlineContent (
0 commit comments