Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions lib/features/settings/theme_editor_dialog.dart
Original file line number Diff line number Diff line change
Expand Up @@ -344,6 +344,7 @@ class _ThemeEditorColorRow extends material.StatelessWidget {
fontSize: 12,
color: cs.mutedForeground,
fontFamily: QueryaTypography.mono,
fontFamilyFallback: QueryaTypography.monoFontFamilyFallback,
),
),
),
Expand Down
2 changes: 1 addition & 1 deletion lib/features/settings/theme_preview_card.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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),
),
),
),
Expand Down
8 changes: 8 additions & 0 deletions test/features/settings/theme_editor_dialog_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
19 changes: 19 additions & 0 deletions test/features/settings/theme_preview_card_test.dart
Original file line number Diff line number Diff line change
Expand Up @@ -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<material.Container>(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 {
Expand Down
Loading