diff --git a/lib/app_upgrade_simple.dart b/lib/app_upgrade_simple.dart index 6585e4f..13f7036 100644 --- a/lib/app_upgrade_simple.dart +++ b/lib/app_upgrade_simple.dart @@ -1106,7 +1106,14 @@ mixin _UpgradeDialogLogic on State { } 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 on State { if (buffer.isEmpty) return; spans.add(TextSpan( text: buffer.toString(), - style: styles.defaultStyle, )); buffer.clear(); } @@ -1261,9 +1267,12 @@ mixin _UpgradeDialogLogic on State { 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;