diff --git a/lib/features/settings/theme_editor_dialog.dart b/lib/features/settings/theme_editor_dialog.dart index 7dbee598..b7ba96af 100644 --- a/lib/features/settings/theme_editor_dialog.dart +++ b/lib/features/settings/theme_editor_dialog.dart @@ -344,6 +344,7 @@ class _ThemeEditorColorRow extends material.StatelessWidget { fontSize: 12, color: cs.mutedForeground, fontFamily: QueryaTypography.mono, + fontFamilyFallback: QueryaTypography.monoFontFamilyFallback, ), ), ), diff --git a/lib/features/settings/theme_preview_card.dart b/lib/features/settings/theme_preview_card.dart index b61d0136..2fd0ff8c 100644 --- a/lib/features/settings/theme_preview_card.dart +++ b/lib/features/settings/theme_preview_card.dart @@ -223,7 +223,7 @@ class _Swatch extends material.StatelessWidget { color: color, borderRadius: material.BorderRadius.circular(radius), border: material.Border.all( - color: material.Colors.black.withValues(alpha: 0.12), + color: Theme.of(context).colorScheme.border.withValues(alpha: 0.6), ), ), ), diff --git a/test/features/settings/theme_editor_dialog_test.dart b/test/features/settings/theme_editor_dialog_test.dart index 28688753..b23a9b61 100644 --- a/test/features/settings/theme_editor_dialog_test.dart +++ b/test/features/settings/theme_editor_dialog_test.dart @@ -102,6 +102,14 @@ void main() { expect(find.text(field.label), findsWidgets); } + // Verify hex label uses mono font and fallback + final hexTextFinder = find.byWidgetPredicate((widget) { + return widget is material.Text && + widget.style?.fontFamily == 'Cascadia Code' && + widget.style?.fontFamilyFallback?.contains('Consolas') == true; + }); + expect(hexTextFinder, findsWidgets); + // Close modal await tester.tap(find.text('Done')); await tester.pumpAndSettle(); diff --git a/test/features/settings/theme_preview_card_test.dart b/test/features/settings/theme_preview_card_test.dart index 9cf26532..34cf73c3 100644 --- a/test/features/settings/theme_preview_card_test.dart +++ b/test/features/settings/theme_preview_card_test.dart @@ -40,6 +40,25 @@ void main() { expect(find.text('Surface'), findsOneWidget); expect(find.text('Primary'), findsOneWidget); expect(find.text('Accent'), findsOneWidget); + + // Verify swatch border uses theme border token with alpha + final containers = tester + .widgetList(find.byType(material.Container)) + .where((c) { + final dec = c.decoration; + return dec is material.BoxDecoration && dec.border is material.Border; + }).toList(); + + final swatchBox = containers.firstWhere((c) { + final dec = c.decoration as material.BoxDecoration; + return dec.borderRadius == material.BorderRadius.circular(4); + }); + final border = + (swatchBox.decoration as material.BoxDecoration).border as material.Border; + expect( + border.top.color, + QueryaTheme.darkDefault.colorScheme.border.withValues(alpha: 0.6), + ); }); testWidgets('shows loading state', (tester) async {