This commit is contained in:
Forrest 2026-07-29 16:22:00 -04:00
parent fc22d11df1
commit 27a8a62475
32 changed files with 354 additions and 335 deletions

View file

@ -10,13 +10,13 @@ import 'tokens.dart';
/// then interpolated toward over ~400ms. Phase 1 just exposes the default and
/// a setter; the extraction + animation land in Phase 2 with playback.
class AccentNotifier extends StateNotifier<Color> {
AccentNotifier() : super(RatuneColors.accentDefault);
AccentNotifier() : super(TimbreColors.accentDefault);
/// Snap to a new accent (e.g. from album-art extraction).
void set(Color color) => state = color;
/// Return to the fixed default (e.g. no art / `static` theme).
void reset() => state = RatuneColors.accentDefault;
void reset() => state = TimbreColors.accentDefault;
}
final accentProvider = StateNotifierProvider<AccentNotifier, Color>(

View file

@ -8,45 +8,45 @@ import 'tokens.dart';
/// Monospace type is core to the identity — every surface uses JetBrains Mono
/// (a close analog to the terminal fonts in Ratune's screenshots). The [accent]
/// is passed in so the theme rebuilds when album-art extraction changes it.
ThemeData buildRatuneTheme(Color accent) {
ThemeData buildTimbreTheme(Color accent) {
final mono = GoogleFonts.jetBrainsMonoTextTheme(
ThemeData.dark().textTheme,
).apply(
bodyColor: RatuneColors.foreground,
displayColor: RatuneColors.foreground,
bodyColor: TimbreColors.foreground,
displayColor: TimbreColors.foreground,
);
final scheme = ColorScheme.fromSeed(
seedColor: accent,
brightness: Brightness.dark,
surface: RatuneColors.surface,
surface: TimbreColors.surface,
).copyWith(
primary: accent,
secondary: accent,
onSurface: RatuneColors.foreground,
onSurface: TimbreColors.foreground,
);
return ThemeData(
useMaterial3: true,
brightness: Brightness.dark,
scaffoldBackgroundColor: RatuneColors.background,
canvasColor: RatuneColors.background,
scaffoldBackgroundColor: TimbreColors.background,
canvasColor: TimbreColors.background,
colorScheme: scheme,
textTheme: mono,
primaryTextTheme: mono,
dividerColor: RatuneColors.border,
dividerColor: TimbreColors.border,
splashFactory: NoSplash.splashFactory,
highlightColor: Colors.transparent,
// Keep chrome flat and quiet — the content (and accent) carry the look.
appBarTheme: const AppBarTheme(
backgroundColor: RatuneColors.background,
backgroundColor: TimbreColors.background,
surfaceTintColor: Colors.transparent,
elevation: 0,
centerTitle: false,
),
listTileTheme: const ListTileThemeData(
dense: true,
minVerticalPadding: RatuneSpacing.sm,
minVerticalPadding: TimbreSpacing.sm,
),
);
}

View file

@ -6,8 +6,8 @@ import 'package:flutter/widgets.dart';
/// The palette is intentionally near-black and low-contrast; the *accent*
/// is the one lively color and, in the `dynamic` theme, is extracted live
/// from the current album art (Phase 2). Everything else stays fixed.
class RatuneColors {
const RatuneColors._();
class TimbreColors {
const TimbreColors._();
/// App canvas — `background = #1a1a1a`.
static const Color background = Color(0xFF1A1A1A);
@ -34,8 +34,8 @@ class RatuneColors {
}
/// Spacing scale — dense, "player as instrument" rather than airy mobile cards.
class RatuneSpacing {
const RatuneSpacing._();
class TimbreSpacing {
const TimbreSpacing._();
static const double xs = 2;
static const double sm = 4;