refactor: Replace hardcoded monospace font with AppTypography constant

- Updated multiple instances of the 'monospace' font family to use AppTypography.monospaceFontFamily for consistency across the application.
- This change enhances maintainability and ensures a unified typography approach throughout the app.
This commit is contained in:
cogwheel0
2025-10-21 00:09:12 +05:30
parent a0a0d43116
commit d00cbe36cf
6 changed files with 10 additions and 10 deletions

View File

@@ -456,7 +456,7 @@ class ErrorCard extends StatelessWidget {
child: SelectableText( child: SelectableText(
technicalDetails!, technicalDetails!,
style: const TextStyle( style: const TextStyle(
fontFamily: 'monospace', fontFamily: AppTypography.monospaceFontFamily,
fontSize: AppTypography.labelMedium, fontSize: AppTypography.labelMedium,
), ),
), ),
@@ -539,7 +539,7 @@ class ErrorDialog extends StatelessWidget {
SelectableText( SelectableText(
technicalDetails!, technicalDetails!,
style: const TextStyle( style: const TextStyle(
fontFamily: 'monospace', fontFamily: AppTypography.monospaceFontFamily,
fontSize: AppTypography.labelMedium, fontSize: AppTypography.labelMedium,
), ),
), ),

View File

@@ -288,7 +288,7 @@ class _AuthenticationPageState extends ConsumerState<AuthenticationPage> {
hostText, hostText,
style: context.conduitTheme.bodySmall?.copyWith( style: context.conduitTheme.bodySmall?.copyWith(
color: context.conduitTheme.textSecondary, color: context.conduitTheme.textSecondary,
fontFamily: 'monospace', fontFamily: AppTypography.monospaceFontFamily,
), ),
), ),
], ],

View File

@@ -151,7 +151,7 @@ class _ConnectionIssuePageState extends ConsumerState<ConnectionIssuePage> {
textAlign: TextAlign.center, textAlign: TextAlign.center,
style: context.conduitTheme.bodyMedium?.copyWith( style: context.conduitTheme.bodyMedium?.copyWith(
color: context.conduitTheme.textPrimary, color: context.conduitTheme.textPrimary,
fontFamily: 'monospace', fontFamily: AppTypography.monospaceFontFamily,
), ),
), ),
const SizedBox(height: Spacing.xs), const SizedBox(height: Spacing.xs),

View File

@@ -721,7 +721,7 @@ class _ServerConnectionPageState extends ConsumerState<ServerConnectionPage> {
entry.value, entry.value,
style: context.conduitTheme.bodySmall?.copyWith( style: context.conduitTheme.bodySmall?.copyWith(
color: context.conduitTheme.textSecondary, color: context.conduitTheme.textSecondary,
fontFamily: 'monospace', fontFamily: AppTypography.monospaceFontFamily,
), ),
overflow: TextOverflow.ellipsis, overflow: TextOverflow.ellipsis,
), ),

View File

@@ -385,7 +385,7 @@ class _AssistantMessageWidgetState extends ConsumerState<AssistantMessageWidget>
style: TextStyle( style: TextStyle(
fontSize: AppTypography.bodySmall, fontSize: AppTypography.bodySmall,
color: theme.textSecondary, color: theme.textSecondary,
fontFamily: 'monospace', fontFamily: AppTypography.monospaceFontFamily,
height: 1.35, height: 1.35,
), ),
), ),
@@ -407,7 +407,7 @@ class _AssistantMessageWidgetState extends ConsumerState<AssistantMessageWidget>
style: TextStyle( style: TextStyle(
fontSize: AppTypography.bodySmall, fontSize: AppTypography.bodySmall,
color: theme.textSecondary, color: theme.textSecondary,
fontFamily: 'monospace', fontFamily: AppTypography.monospaceFontFamily,
height: 1.35, height: 1.35,
), ),
), ),
@@ -1207,7 +1207,7 @@ class _AssistantMessageWidgetState extends ConsumerState<AssistantMessageWidget>
style: TextStyle( style: TextStyle(
fontSize: AppTypography.bodySmall, fontSize: AppTypography.bodySmall,
color: theme.textSecondary, color: theme.textSecondary,
fontFamily: 'monospace', fontFamily: AppTypography.monospaceFontFamily,
height: 1.4, height: 1.4,
), ),
), ),
@@ -1994,7 +1994,7 @@ class CodeExecutionListView extends StatelessWidget {
child: SelectableText( child: SelectableText(
execution.code!, execution.code!,
style: const TextStyle( style: const TextStyle(
fontFamily: 'monospace', fontFamily: AppTypography.monospaceFontFamily,
height: 1.4, height: 1.4,
), ),
), ),

View File

@@ -1168,7 +1168,7 @@ class ConduitShadows {
class AppTypography { class AppTypography {
// Primary UI font now uses the platform default system font // Primary UI font now uses the platform default system font
static const String fontFamily = ''; static const String fontFamily = '';
static const String monospaceFontFamily = 'SF Mono'; static const String monospaceFontFamily = 'monospace';
// Letter spacing values - Enhanced for better readability // Letter spacing values - Enhanced for better readability
static const double letterSpacingTight = -0.5; static const double letterSpacingTight = -0.5;