111
This commit is contained in:
parent
e0d18e2e62
commit
8cefc0007b
|
|
@ -1106,7 +1106,14 @@ mixin _UpgradeDialogLogic<T extends StatefulWidget> on State<T> {
|
|||
}
|
||||
|
||||
return RichText(
|
||||
text: TextSpan(children: spans),
|
||||
text: TextSpan(
|
||||
style: TextStyle(
|
||||
fontSize: 13,
|
||||
color: colorScheme.onSurface.withOpacity(0.8),
|
||||
height: 1.4,
|
||||
),
|
||||
children: spans,
|
||||
),
|
||||
softWrap: true,
|
||||
maxLines: null,
|
||||
);
|
||||
|
|
@ -1141,7 +1148,6 @@ mixin _UpgradeDialogLogic<T extends StatefulWidget> on State<T> {
|
|||
if (buffer.isEmpty) return;
|
||||
spans.add(TextSpan(
|
||||
text: buffer.toString(),
|
||||
style: styles.defaultStyle,
|
||||
));
|
||||
buffer.clear();
|
||||
}
|
||||
|
|
@ -1261,9 +1267,12 @@ mixin _UpgradeDialogLogic<T extends StatefulWidget> on State<T> {
|
|||
TextSpan _mergeTextSpanStyle(TextSpan span, TextStyle style) {
|
||||
final mergedChildren =
|
||||
span.children?.map((child) => child is TextSpan ? _mergeTextSpanStyle(child, style) : child).toList();
|
||||
|
||||
final mergedStyle = span.style != null ? style.merge(span.style) : style;
|
||||
|
||||
return TextSpan(
|
||||
text: span.text,
|
||||
style: span.style?.merge(style) ?? style,
|
||||
style: mergedStyle,
|
||||
children: mergedChildren,
|
||||
);
|
||||
}
|
||||
|
|
@ -2176,12 +2185,7 @@ typedef BoolCallback = void Function(bool success);
|
|||
|
||||
class _RichTextStyles {
|
||||
_RichTextStyles(ColorScheme colorScheme)
|
||||
: defaultStyle = TextStyle(
|
||||
fontSize: 13,
|
||||
color: colorScheme.onSurface.withOpacity(0.8),
|
||||
height: 1.4,
|
||||
),
|
||||
boldStyle = TextStyle(
|
||||
: boldStyle = TextStyle(
|
||||
fontSize: 13,
|
||||
color: colorScheme.onSurface.withOpacity(0.9),
|
||||
height: 1.4,
|
||||
|
|
@ -2207,7 +2211,6 @@ class _RichTextStyles {
|
|||
fontWeight: FontWeight.w600,
|
||||
);
|
||||
|
||||
final TextStyle defaultStyle;
|
||||
final TextStyle boldStyle;
|
||||
final TextStyle italicStyle;
|
||||
final TextStyle codeStyle;
|
||||
|
|
|
|||
Loading…
Reference in New Issue