Reduce size of collapsing pull quote text

This commit is contained in:
Shawn 2022-09-12 14:28:33 -06:00
parent 7ff835c4a0
commit 0b6aeeaa62
2 changed files with 2 additions and 6 deletions

View File

@ -85,7 +85,7 @@ class _Text {
late final TextStyle bodySmall = copy(contentFont, sizePx: 14, heightPx: 23); late final TextStyle bodySmall = copy(contentFont, sizePx: 14, heightPx: 23);
late final TextStyle bodySmallBold = copy(contentFont, sizePx: 14, heightPx: 23, weight: FontWeight.w600); late final TextStyle bodySmallBold = copy(contentFont, sizePx: 14, heightPx: 23, weight: FontWeight.w600);
late final TextStyle quote1 = copy(quoteFont, sizePx: 36, heightPx: 40, weight: FontWeight.w600, spacingPc: -3); late final TextStyle quote1 = copy(quoteFont, sizePx: 32, heightPx: 40, weight: FontWeight.w600, spacingPc: -3);
late final TextStyle quote2 = copy(quoteFont, sizePx: 21, heightPx: 32, weight: FontWeight.w400); late final TextStyle quote2 = copy(quoteFont, sizePx: 21, heightPx: 32, weight: FontWeight.w400);
late final TextStyle quote2Sub = copy(body, sizePx: 16, heightPx: 40, weight: FontWeight.w400); late final TextStyle quote2Sub = copy(body, sizePx: 16, heightPx: 40, weight: FontWeight.w400);

View File

@ -16,11 +16,7 @@ class _CollapsingPullQuoteImage extends StatelessWidget {
/// A single piece of quote text, this widget has one on top, and one on bottom /// A single piece of quote text, this widget has one on top, and one on bottom
Widget buildText(String value, double collapseAmt, {required bool top, bool isAuthor = false}) { Widget buildText(String value, double collapseAmt, {required bool top, bool isAuthor = false}) {
var quoteStyle = $styles.text.quote1; var quoteStyle = $styles.text.quote1;
var quoteSize = quoteStyle.fontSize; quoteStyle = quoteStyle.copyWith(color: $styles.colors.caption);
quoteStyle = quoteStyle.copyWith(
color: $styles.colors.caption,
fontSize: (quoteSize ??= 36), //dynamic font size for more consistent quote layout
);
if (isAuthor) { if (isAuthor) {
quoteStyle = quoteStyle.copyWith(fontSize: 20, fontWeight: FontWeight.w600); quoteStyle = quoteStyle.copyWith(fontSize: 20, fontWeight: FontWeight.w600);
} }