chore: Follow up matrix pills

pull/953/head
Krille 2 years ago
parent 0b9d258e56
commit d83c26a3c9
No known key found for this signature in database
GPG Key ID: E067ECD60F1A0652

@ -147,7 +147,7 @@ class HtmlMessage extends StatelessWidget {
), ),
}, },
extensions: [ extensions: [
RoomPillExtension(context, room, fontSize), RoomPillExtension(context, room, fontSize, linkColor),
CodeExtension(fontSize: fontSize), CodeExtension(fontSize: fontSize),
MatrixMathExtension( MatrixMathExtension(
style: TextStyle(fontSize: fontSize, color: textColor), style: TextStyle(fontSize: fontSize, color: textColor),
@ -433,8 +433,9 @@ class RoomPillExtension extends HtmlExtension {
final Room room; final Room room;
final BuildContext context; final BuildContext context;
final double fontSize; final double fontSize;
final Color color;
RoomPillExtension(this.context, this.room, this.fontSize); RoomPillExtension(this.context, this.room, this.fontSize, this.color);
@override @override
Set<String> get supportedTags => {'a'}; Set<String> get supportedTags => {'a'};
@ -472,6 +473,7 @@ class RoomPillExtension extends HtmlExtension {
uri: href, uri: href,
outerContext: this.context, outerContext: this.context,
fontSize: fontSize, fontSize: fontSize,
color: color,
), ),
), ),
); );
@ -488,6 +490,7 @@ class RoomPillExtension extends HtmlExtension {
uri: href, uri: href,
outerContext: this.context, outerContext: this.context,
fontSize: fontSize, fontSize: fontSize,
color: color,
), ),
); );
} }
@ -503,6 +506,7 @@ class MatrixPill extends StatelessWidget {
final Uri? avatar; final Uri? avatar;
final String uri; final String uri;
final double? fontSize; final double? fontSize;
final Color? color;
const MatrixPill({ const MatrixPill({
super.key, super.key,
@ -511,6 +515,7 @@ class MatrixPill extends StatelessWidget {
this.avatar, this.avatar,
required this.uri, required this.uri,
required this.fontSize, required this.fontSize,
required this.color,
}); });
@override @override
@ -529,7 +534,7 @@ class MatrixPill extends StatelessWidget {
Text( Text(
name, name,
style: TextStyle( style: TextStyle(
color: Theme.of(outerContext).colorScheme.primary, color: color,
decoration: TextDecoration.underline, decoration: TextDecoration.underline,
fontSize: fontSize, fontSize: fontSize,
height: 1.25, height: 1.25,

Loading…
Cancel
Save