9eaa8d18c0
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>
38 lines
1.3 KiB
Dart
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),
|
|
);
|
|
}
|