fix(fonts): honour the monospace setting in context-free render helpers (T-472)

Eleven leaf sites rendered monospace text from top-level/static helpers that
take no BuildContext, so they hard-coded clideMonoFamily and ignored the
Settings → Appearance Monospace choice that the D-101 facade made live
everywhere else.

Thread the resolved family in from the nearest context-bearing caller:
- claude tool bodies/results: a required `mono` field on _ConversationTurn +
  a `mono` arg on the shared toolInputBody chain;
- markdown inline `code`/record/file-ref spans: carried on ClideMarkdownHooks,
  which build() already constructs from context and threads to every static;
- search preview styles and welcome tips: a `mono` parameter on the helpers.

No behaviour change when the setting is default; these surfaces now switch
live with the rest.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-06-17 21:35:38 +02:00
co-authored by Claude Opus 4.8
parent 6b5317342b
commit c4248e3228
8 changed files with 83 additions and 42 deletions
+4 -4
View File
@@ -107,16 +107,16 @@ class _TipsCard extends StatelessWidget {
children: [
ClideText('TIPS', fontSize: clideFontSmall, color: tokens.sidebarSectionHeader, fontFamily: ClideSettings.fonts.monoOf(context)),
const SizedBox(height: 14),
_tipRow(firstRow),
_tipRow(firstRow, ClideSettings.fonts.monoOf(context)),
const SizedBox(height: 8),
_tipRow(secondRow),
_tipRow(secondRow, ClideSettings.fonts.monoOf(context)),
],
),
),
);
}
Widget _tipRow(List<(String, String)> tips) {
Widget _tipRow(List<(String, String)> tips, String mono) {
return Row(
children: [
for (var i = 0; i < tips.length; i++) ...[
@@ -126,7 +126,7 @@ class _TipsCard extends StatelessWidget {
Expanded(
child: ClideText(tips[i].$1, fontSize: clideFontMeta, color: tokens.globalTextMuted),
),
ClideText(tips[i].$2, fontSize: clideFontSmall, color: tokens.globalForeground, fontFamily: clideMonoFamily),
ClideText(tips[i].$2, fontSize: clideFontSmall, color: tokens.globalForeground, fontFamily: mono),
],
),
),