소스 검색

Align quick-action chip borders with the chat input field styling.

Reuse the input field background, border, and corner radius so Code, Write, and related chips match the text field's flat bordered look.

Co-authored-by: Cursor <cursoragent@cursor.com>
AhtashamShahzad1 3 주 전
부모
커밋
3855363262
2개의 변경된 파일8개의 추가작업 그리고 8개의 파일을 삭제
  1. 3 3
      clone _of_clarus_ai_chat_bot/Utilities/AppTheme.swift
  2. 5 5
      clone _of_clarus_ai_chat_bot/Views/QuickActionChip.swift

+ 3 - 3
clone _of_clarus_ai_chat_bot/Utilities/AppTheme.swift

@@ -38,9 +38,9 @@ enum AppTheme {
     static let chatSendButtonBackground = Color(red: 0.14, green: 0.14, blue: 0.16)
     static let chatHeaderDivider = Color(red: 0.92, green: 0.92, blue: 0.94)
 
-    static let quickActionBackground = Color.white
+    static let quickActionBackground = chatInputBackground
     static let quickActionForeground = textPrimary
-    static let quickActionBorder = Color(red: 0.88, green: 0.88, blue: 0.91)
-    static let quickActionIconBackground = Color(red: 0.96, green: 0.96, blue: 0.97)
+    static let quickActionBorder = chatInputBorder
+    static let quickActionIconBackground = Color(red: 0.94, green: 0.94, blue: 0.95)
     static let quickActionSelectedForeground = Color.white
 }

+ 5 - 5
clone _of_clarus_ai_chat_bot/Views/QuickActionChip.swift

@@ -21,17 +21,17 @@ struct QuickActionChip: View {
             .padding(.trailing, 12)
             .padding(.vertical, 5)
             .background(
-                RoundedRectangle(cornerRadius: AppTheme.cornerRadiusPill, style: .continuous)
+                RoundedRectangle(cornerRadius: AppTheme.chatInputCornerRadius, style: .continuous)
                     .fill(backgroundColor)
             )
             .overlay(
-                RoundedRectangle(cornerRadius: AppTheme.cornerRadiusPill, style: .continuous)
+                RoundedRectangle(cornerRadius: AppTheme.chatInputCornerRadius, style: .continuous)
                     .stroke(borderColor, lineWidth: isSelected ? 0 : 1)
             )
             .shadow(
-                color: isSelected ? AppTheme.accent.opacity(0.22) : AppTheme.cardShadow,
-                radius: isSelected ? 8 : 3,
-                y: isSelected ? 3 : 1
+                color: isSelected ? AppTheme.accent.opacity(0.22) : .clear,
+                radius: isSelected ? 8 : 0,
+                y: isSelected ? 3 : 0
             )
         }
         .buttonStyle(.plain)