7d2c3412a1
Adds the Paper design and generalises design tokens (transcript, composer, selected-row styles, reading type, panel fill, chat colour saturation). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
39 lines
1.3 KiB
Dart
39 lines
1.3 KiB
Dart
import 'package:flutter/material.dart';
|
|
|
|
import 'app_design_styles.dart';
|
|
import 'paper_fonts.dart';
|
|
|
|
/// Paper's reading type: the serif at a little over the body size, with a
|
|
/// book's line height and a measure of about seventy characters.
|
|
const ReadingType paperReading = ReadingType(
|
|
family: paperSerifFamily,
|
|
height: 1.55,
|
|
measure: 70,
|
|
scale: 17 / 16,
|
|
);
|
|
|
|
/// [base] for Paper: the page's titles (display, headline and the large
|
|
/// title role a page or dialog heads with) in the reading serif, semibold
|
|
/// and without added tracking; every interface role (list titles, labels,
|
|
/// buttons, chips, metadata and body text in controls) keeps the interface
|
|
/// face, so chrome stays a clean sans.
|
|
TextTheme paperTextTheme(TextTheme base) {
|
|
TextStyle? serif(TextStyle? style) => style?.copyWith(
|
|
fontFamily: paperSerifFamily,
|
|
fontFamilyFallback: style.fontFamily == null
|
|
? null
|
|
: <String>[style.fontFamily!],
|
|
fontWeight: FontWeight.w600,
|
|
letterSpacing: 0,
|
|
);
|
|
return base.copyWith(
|
|
displayLarge: serif(base.displayLarge),
|
|
displayMedium: serif(base.displayMedium),
|
|
displaySmall: serif(base.displaySmall),
|
|
headlineLarge: serif(base.headlineLarge),
|
|
headlineMedium: serif(base.headlineMedium),
|
|
headlineSmall: serif(base.headlineSmall),
|
|
titleLarge: serif(base.titleLarge),
|
|
);
|
|
}
|