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:
@@ -53,7 +53,7 @@ class _DockStatusItemState extends State<DockStatusItem> {
|
||||
return ListenableBuilder(
|
||||
listenable: kernel.arrangement,
|
||||
builder: (ctx, _) {
|
||||
final tokens = ClideTheme.of(ctx).surface;
|
||||
final tokens = ClideSettings.theme.of(ctx).surface;
|
||||
final open = kernel.arrangement.isVisible(Slots.dock);
|
||||
final errors = kernel.logRing.countAtLeast(LogLevel.error);
|
||||
final warns = kernel.logRing.countAtLeast(LogLevel.warn) - errors;
|
||||
|
||||
@@ -75,7 +75,7 @@ class _OutputViewState extends State<OutputView> {
|
||||
return ListenableBuilder(
|
||||
listenable: _c,
|
||||
builder: (context, _) {
|
||||
final tokens = ClideTheme.of(context).surface;
|
||||
final tokens = ClideSettings.theme.of(context).surface;
|
||||
final rows = _c.filtered;
|
||||
return Semantics(
|
||||
label: 'output log',
|
||||
@@ -149,7 +149,7 @@ class _Chip extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final tokens = ClideTheme.of(context).surface;
|
||||
final tokens = ClideSettings.theme.of(context).surface;
|
||||
return Semantics(
|
||||
button: true,
|
||||
label: label,
|
||||
@@ -177,7 +177,7 @@ class _JumpPill extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final tokens = ClideTheme.of(context).surface;
|
||||
final tokens = ClideSettings.theme.of(context).surface;
|
||||
return Semantics(
|
||||
button: true,
|
||||
label: 'jump to latest',
|
||||
@@ -206,7 +206,7 @@ class _LogRow extends StatelessWidget {
|
||||
|
||||
@override
|
||||
Widget build(BuildContext context) {
|
||||
final tokens = ClideTheme.of(context).surface;
|
||||
final tokens = ClideSettings.theme.of(context).surface;
|
||||
final fg = _levelColor(record.level, tokens);
|
||||
final t = record.timestamp;
|
||||
final hh = t.hour.toString().padLeft(2, '0');
|
||||
|
||||
Reference in New Issue
Block a user