fix: update fonts size on game hud (#347)

pull/350/head
arturplaczek 3 years ago committed by GitHub
parent 3465c9f1e7
commit 28606241df
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -50,17 +50,19 @@ class _ScoreDisplay extends StatelessWidget {
Widget build(BuildContext context) {
final l10n = context.l10n;
return Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
Text(
l10n.score.toLowerCase(),
style: Theme.of(context).textTheme.subtitle1,
),
const _ScoreText(),
const RoundCountDisplay(),
],
return FittedBox(
child: Column(
crossAxisAlignment: CrossAxisAlignment.start,
mainAxisAlignment: MainAxisAlignment.spaceEvenly,
children: [
Text(
l10n.score.toLowerCase(),
style: Theme.of(context).textTheme.subtitle1,
),
const _ScoreText(),
const RoundCountDisplay(),
],
),
);
}
}
@ -72,11 +74,9 @@ class _ScoreText extends StatelessWidget {
Widget build(BuildContext context) {
final score = context.select((GameBloc bloc) => bloc.state.displayScore);
return FittedBox(
child: Text(
score.formatScore(),
style: Theme.of(context).textTheme.headline2,
),
return Text(
score.formatScore(),
style: Theme.of(context).textTheme.headline1,
);
}
}

@ -45,7 +45,7 @@ abstract class PinballTextStyle {
);
static const subtitle1 = TextStyle(
fontSize: 10,
fontSize: 12,
fontFamily: _primaryFontFamily,
package: _fontPackage,
color: PinballColors.yellow,

@ -26,9 +26,9 @@ void main() {
expect(style.color, PinballColors.white);
});
test('subtitle1 has fontSize 10 and yellow color', () {
test('subtitle1 has fontSize 12 and yellow color', () {
const style = PinballTextStyle.subtitle1;
expect(style.fontSize, 10);
expect(style.fontSize, 12);
expect(style.color, PinballColors.yellow);
});

Loading…
Cancel
Save