Files
pipelines/app/lib/ui/theme/terminal_typography.dart
T
alan 9eaa8d18c0 Retro CRT design: Terminal on a green or amber phosphor tube
One hue per variant (brightness steps for roles, statuses and chat
colours, with cross/ring glyphs where hue alone told status), square
corners, 1px phosphor frames, a faint text glow and a static scanline and
vignette pattern painted once in its own repaint boundary. Light mode is a
paper-white phosphor. Terminal's theme builder is shared, not forked.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-12-03 23:10:57 +00:00

38 lines
1.3 KiB
Dart

import 'package:flutter/material.dart';
import '../text/monospace.dart';
/// [base] in the monospace family at a terminal's compact size: Material's
/// roles a step smaller (monospace runs wide), with no added letter spacing,
/// and [glow] (Retro CRT's phosphor halo) as every role's shadow.
TextTheme terminalTextTheme(TextTheme base, {List<Shadow>? glow}) {
TextStyle? mono(TextStyle? style) {
if (style == null) return null;
final size = style.fontSize;
return style.copyWith(
fontFamily: appMonospaceFamily,
fontSize: size == null ? null : (size * 0.875).roundToDouble(),
letterSpacing: 0,
shadows: glow,
);
}
return base.copyWith(
displayLarge: mono(base.displayLarge),
displayMedium: mono(base.displayMedium),
displaySmall: mono(base.displaySmall),
headlineLarge: mono(base.headlineLarge),
headlineMedium: mono(base.headlineMedium),
headlineSmall: mono(base.headlineSmall),
titleLarge: mono(base.titleLarge),
titleMedium: mono(base.titleMedium),
titleSmall: mono(base.titleSmall),
bodyLarge: mono(base.bodyLarge),
bodyMedium: mono(base.bodyMedium),
bodySmall: mono(base.bodySmall),
labelLarge: mono(base.labelLarge),
labelMedium: mono(base.labelMedium),
labelSmall: mono(base.labelSmall),
);
}