refactor(ChatScreen): update text colors for dark mode compatibility
- Modified text color styles in SegmentRenderer and styles.ts to utilize theme colors for better adaptability in dark mode. - Updated bubble colors in palettes.ts to enhance visual consistency across chat components.
This commit is contained in:
@@ -847,7 +847,7 @@ function createSegmentStyles(colors: AppColors) {
|
|||||||
marginTop: 2,
|
marginTop: 2,
|
||||||
},
|
},
|
||||||
|
|
||||||
// 文本 - 柔和风格:深灰色文字 + 正常字重
|
// 文本 - 适配暗色模式
|
||||||
textContent: {
|
textContent: {
|
||||||
fontSize: 17.5,
|
fontSize: 17.5,
|
||||||
lineHeight: 25,
|
lineHeight: 25,
|
||||||
@@ -855,10 +855,10 @@ function createSegmentStyles(colors: AppColors) {
|
|||||||
fontWeight: '400',
|
fontWeight: '400',
|
||||||
},
|
},
|
||||||
textMe: {
|
textMe: {
|
||||||
color: '#2A2A2A',
|
color: colors.chat.textPrimary,
|
||||||
},
|
},
|
||||||
textOther: {
|
textOther: {
|
||||||
color: '#2A2A2A',
|
color: colors.chat.textPrimary,
|
||||||
},
|
},
|
||||||
|
|
||||||
// @提及 - 微信/QQ 风格:更精致的高亮
|
// @提及 - 微信/QQ 风格:更精致的高亮
|
||||||
|
|||||||
@@ -227,7 +227,7 @@ export function createChatScreenStyles(colors: AppColors) {
|
|||||||
},
|
},
|
||||||
senderName: {
|
senderName: {
|
||||||
fontSize: 14,
|
fontSize: 14,
|
||||||
color: '#555555', // 柔和的深灰色
|
color: colors.chat.textSecondary, // 使用主题次要文字颜色
|
||||||
marginBottom: 4,
|
marginBottom: 4,
|
||||||
marginLeft: 4,
|
marginLeft: 4,
|
||||||
fontWeight: '600',
|
fontWeight: '600',
|
||||||
@@ -272,14 +272,14 @@ export function createChatScreenStyles(colors: AppColors) {
|
|||||||
borderStyle: 'dashed',
|
borderStyle: 'dashed',
|
||||||
},
|
},
|
||||||
myBubbleText: {
|
myBubbleText: {
|
||||||
color: '#2A2A2A',
|
color: colors.chat.textPrimary, // 使用主题文字颜色
|
||||||
fontSize: 18, // 更大字体
|
fontSize: 18,
|
||||||
lineHeight: 25, // 相应调大行高
|
lineHeight: 25,
|
||||||
letterSpacing: 0.1,
|
letterSpacing: 0.1,
|
||||||
fontWeight: '400',
|
fontWeight: '400',
|
||||||
},
|
},
|
||||||
theirBubbleText: {
|
theirBubbleText: {
|
||||||
color: '#2A2A2A',
|
color: colors.chat.textPrimary, // 使用主题文字颜色
|
||||||
fontSize: 18,
|
fontSize: 18,
|
||||||
lineHeight: 25,
|
lineHeight: 25,
|
||||||
letterSpacing: 0.1,
|
letterSpacing: 0.1,
|
||||||
|
|||||||
@@ -168,8 +168,8 @@ export const darkColors = {
|
|||||||
link: '#5AC8FA',
|
link: '#5AC8FA',
|
||||||
success: '#32D74B',
|
success: '#32D74B',
|
||||||
danger: '#FF453A',
|
danger: '#FF453A',
|
||||||
bubbleOutgoing: '#3A3A3C',
|
bubbleOutgoing: '#2E5A8C', // 暗色模式:深蓝气泡
|
||||||
bubbleIncoming: '#2C2C2E',
|
bubbleIncoming: '#2C2C2E', // 暗色模式:灰色气泡
|
||||||
replyTint: '#1A3A52',
|
replyTint: '#1A3A52',
|
||||||
replyTintActive: '#224060',
|
replyTintActive: '#224060',
|
||||||
replyBorder: '#4A88C7',
|
replyBorder: '#4A88C7',
|
||||||
|
|||||||
Reference in New Issue
Block a user