refactor(theme): route consumer reads through ClideSettings.theme (T-473)
Migrate ClideTheme.of(context) reads across the widget, feature, and shell layers to the unified ClideSettings.theme.of(context) facade (D-101), so theme/i18n/fonts/settings share one widget-facing entry. The facade delegates straight to ClideTheme, so behaviour is unchanged — goldens are unmoved. The low-level theme provider keeps its direct ClideTheme.of: the facade is built on it, and the two kernel sites (ClideTheme's own definition + the panels drag-resize widget) stay direct to avoid a widgets→kernel import cycle. Dead controller.dart/kernel.dart imports left by the sweep removed. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -92,8 +92,8 @@ class _DecisionDetailViewState extends State<DecisionDetailView> {
|
||||
final d = _decision;
|
||||
if (d == null) return const Padding(padding: EdgeInsets.all(12), child: ClideText('Select a decision to view details.', muted: true));
|
||||
|
||||
final tokens = ClideTheme.of(context).surface;
|
||||
final isDark = ClideTheme.of(context).dark;
|
||||
final tokens = ClideSettings.theme.of(context).surface;
|
||||
final isDark = ClideSettings.theme.of(context).dark;
|
||||
final typeColors = DecisionTypeColors.forTheme(dark: isDark);
|
||||
|
||||
final id = d['id'] as String? ?? '';
|
||||
|
||||
@@ -128,7 +128,7 @@ class _DecisionsViewState extends State<DecisionsView> {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final tokens = ClideTheme.of(context).surface;
|
||||
final tokens = ClideSettings.theme.of(context).surface;
|
||||
if (_loading) return const Center(child: ClideText('Loading decisions...', muted: true));
|
||||
if (_error != null) return Padding(padding: const EdgeInsets.all(12), child: ClideText(_error!, muted: true));
|
||||
if (_decisions.isEmpty) {
|
||||
@@ -153,7 +153,7 @@ class _DecisionsViewState extends State<DecisionsView> {
|
||||
final questions = filtered.where((d) => d.type == 'question').toList();
|
||||
final rejected = filtered.where((d) => d.type == 'rejected').toList();
|
||||
|
||||
final isDark = ClideTheme.of(context).dark;
|
||||
final isDark = ClideSettings.theme.of(context).dark;
|
||||
final typeColors = DecisionTypeColors.forTheme(dark: isDark);
|
||||
|
||||
return Column(
|
||||
|
||||
Reference in New Issue
Block a user