Make zinc accent monochrome and respect accentForeground
This commit is contained in:
@@ -489,7 +489,7 @@ export function AddHostModal({ visible, onClose, onCancel, onSaved }: AddHostMod
|
|||||||
<View style={checkboxStyle}>
|
<View style={checkboxStyle}>
|
||||||
{useTls ? (
|
{useTls ? (
|
||||||
<View testID="direct-ssl-toggle-checked">
|
<View testID="direct-ssl-toggle-checked">
|
||||||
<Check size={14} color={theme.colors.palette.white} />
|
<Check size={14} color={theme.colors.accentForeground} />
|
||||||
</View>
|
</View>
|
||||||
) : null}
|
) : null}
|
||||||
</View>
|
</View>
|
||||||
|
|||||||
@@ -463,7 +463,7 @@ function QueuedMessageRow({ item, onEdit, onSendNow }: QueuedMessageRowProps) {
|
|||||||
accessibilityLabel="Send queued message now"
|
accessibilityLabel="Send queued message now"
|
||||||
accessibilityRole="button"
|
accessibilityRole="button"
|
||||||
>
|
>
|
||||||
<ArrowUp size={ICON_SIZE.sm} color="white" />
|
<ThemedArrowUp size={ICON_SIZE.sm} uniProps={iconAccentForegroundMapping} />
|
||||||
</Pressable>
|
</Pressable>
|
||||||
</View>
|
</View>
|
||||||
</View>
|
</View>
|
||||||
@@ -1847,6 +1847,7 @@ const styles = StyleSheet.create((theme: Theme) => ({
|
|||||||
const QUEUE_SEND_BUTTON_STYLE = [styles.queueActionButton, styles.queueSendButton];
|
const QUEUE_SEND_BUTTON_STYLE = [styles.queueActionButton, styles.queueSendButton];
|
||||||
|
|
||||||
const ThemedPencil = withUnistyles(Pencil);
|
const ThemedPencil = withUnistyles(Pencil);
|
||||||
|
const ThemedArrowUp = withUnistyles(ArrowUp);
|
||||||
const ThemedGitPullRequest = withUnistyles(GitPullRequest);
|
const ThemedGitPullRequest = withUnistyles(GitPullRequest);
|
||||||
const ThemedCircleDot = withUnistyles(CircleDot);
|
const ThemedCircleDot = withUnistyles(CircleDot);
|
||||||
const ThemedAudioLines = withUnistyles(AudioLines);
|
const ThemedAudioLines = withUnistyles(AudioLines);
|
||||||
@@ -1855,3 +1856,4 @@ const ThemedGithub = withUnistyles(Github);
|
|||||||
|
|
||||||
const iconForegroundMapping = (theme: Theme) => ({ color: theme.colors.foreground });
|
const iconForegroundMapping = (theme: Theme) => ({ color: theme.colors.foreground });
|
||||||
const iconForegroundMutedMapping = (theme: Theme) => ({ color: theme.colors.foregroundMuted });
|
const iconForegroundMutedMapping = (theme: Theme) => ({ color: theme.colors.foregroundMuted });
|
||||||
|
const iconAccentForegroundMapping = (theme: Theme) => ({ color: theme.colors.accentForeground });
|
||||||
|
|||||||
@@ -166,16 +166,16 @@ export function DictationOverlay({
|
|||||||
[actionsDisabled, isFailed],
|
[actionsDisabled, isFailed],
|
||||||
);
|
);
|
||||||
const overlayTimerTextStyle = useMemo(
|
const overlayTimerTextStyle = useMemo(
|
||||||
() => [overlayStyles.timerText, { color: theme.colors.palette.white }],
|
() => [overlayStyles.timerText, { color: theme.colors.accentForeground }],
|
||||||
[theme.colors.palette.white],
|
[theme.colors.accentForeground],
|
||||||
);
|
);
|
||||||
const overlayTranscriptTextStyle = useMemo(
|
const overlayTranscriptTextStyle = useMemo(
|
||||||
() => [overlayStyles.transcriptText, { color: theme.colors.palette.white, opacity: 0.95 }],
|
() => [overlayStyles.transcriptText, { color: theme.colors.accentForeground, opacity: 0.95 }],
|
||||||
[theme.colors.palette.white],
|
[theme.colors.accentForeground],
|
||||||
);
|
);
|
||||||
const overlayRetryButtonStyle = useMemo(
|
const overlayRetryButtonStyle = useMemo(
|
||||||
() => [overlayStyles.actionButton, { backgroundColor: theme.colors.palette.white }],
|
() => [overlayStyles.actionButton, { backgroundColor: theme.colors.accentForeground }],
|
||||||
[theme.colors.palette.white],
|
[theme.colors.accentForeground],
|
||||||
);
|
);
|
||||||
const overlayConfirmButtonStyle = overlayRetryButtonStyle;
|
const overlayConfirmButtonStyle = overlayRetryButtonStyle;
|
||||||
|
|
||||||
@@ -192,7 +192,7 @@ export function DictationOverlay({
|
|||||||
accessibilityLabel="Cancel dictation"
|
accessibilityLabel="Cancel dictation"
|
||||||
style={overlayCancelButtonStyle}
|
style={overlayCancelButtonStyle}
|
||||||
>
|
>
|
||||||
<X size={theme.iconSize.lg} color={theme.colors.palette.white} strokeWidth={2.5} />
|
<X size={theme.iconSize.lg} color={theme.colors.accentForeground} strokeWidth={2.5} />
|
||||||
</Pressable>
|
</Pressable>
|
||||||
|
|
||||||
<View style={overlayStyles.centerContainer}>
|
<View style={overlayStyles.centerContainer}>
|
||||||
@@ -202,7 +202,7 @@ export function DictationOverlay({
|
|||||||
isMuted={false}
|
isMuted={false}
|
||||||
isSpeaking={false}
|
isSpeaking={false}
|
||||||
orientation="horizontal"
|
orientation="horizontal"
|
||||||
color={theme.colors.palette.white}
|
color={theme.colors.accentForeground}
|
||||||
/>
|
/>
|
||||||
<Text style={overlayTimerTextStyle}>{formatDuration(duration)}</Text>
|
<Text style={overlayTimerTextStyle}>{formatDuration(duration)}</Text>
|
||||||
</View>
|
</View>
|
||||||
@@ -216,7 +216,7 @@ export function DictationOverlay({
|
|||||||
<View style={overlayStyles.actionButtonsContainer}>
|
<View style={overlayStyles.actionButtonsContainer}>
|
||||||
{actionsDisabled ? (
|
{actionsDisabled ? (
|
||||||
<View style={overlayStyles.loadingContainer}>
|
<View style={overlayStyles.loadingContainer}>
|
||||||
<ActivityIndicator size="small" color={theme.colors.palette.white} />
|
<ActivityIndicator size="small" color={theme.colors.accentForeground} />
|
||||||
</View>
|
</View>
|
||||||
) : null}
|
) : null}
|
||||||
{!actionsDisabled && isFailed ? (
|
{!actionsDisabled && isFailed ? (
|
||||||
@@ -239,7 +239,7 @@ export function DictationOverlay({
|
|||||||
>
|
>
|
||||||
<Pencil
|
<Pencil
|
||||||
size={theme.iconSize.lg}
|
size={theme.iconSize.lg}
|
||||||
color={theme.colors.palette.white}
|
color={theme.colors.accentForeground}
|
||||||
strokeWidth={2.5}
|
strokeWidth={2.5}
|
||||||
/>
|
/>
|
||||||
</Pressable>
|
</Pressable>
|
||||||
|
|||||||
@@ -315,12 +315,12 @@ function SendButtonContent({
|
|||||||
buttonIconSize: number;
|
buttonIconSize: number;
|
||||||
}) {
|
}) {
|
||||||
if (isSubmitLoading) {
|
if (isSubmitLoading) {
|
||||||
return <ActivityIndicator size="small" color="white" />;
|
return <ThemedActivityIndicator size="small" uniProps={iconAccentForegroundMapping} />;
|
||||||
}
|
}
|
||||||
if (submitIcon === "return") {
|
if (submitIcon === "return") {
|
||||||
return <CornerDownLeft size={buttonIconSize} color="white" />;
|
return <ThemedCornerDownLeft size={buttonIconSize} uniProps={iconAccentForegroundMapping} />;
|
||||||
}
|
}
|
||||||
return <ArrowUp size={buttonIconSize} color="white" />;
|
return <ThemedArrowUp size={buttonIconSize} uniProps={iconAccentForegroundMapping} />;
|
||||||
}
|
}
|
||||||
|
|
||||||
function resolveSubmitAccessibilityLabel(input: {
|
function resolveSubmitAccessibilityLabel(input: {
|
||||||
@@ -1977,10 +1977,14 @@ const styles = StyleSheet.create((theme: Theme) => ({
|
|||||||
const ThemedPlus = withUnistyles(Plus);
|
const ThemedPlus = withUnistyles(Plus);
|
||||||
const ThemedMic = withUnistyles(Mic);
|
const ThemedMic = withUnistyles(Mic);
|
||||||
const ThemedMicOff = withUnistyles(MicOff);
|
const ThemedMicOff = withUnistyles(MicOff);
|
||||||
|
const ThemedArrowUp = withUnistyles(ArrowUp);
|
||||||
|
const ThemedCornerDownLeft = withUnistyles(CornerDownLeft);
|
||||||
|
const ThemedActivityIndicator = withUnistyles(ActivityIndicator);
|
||||||
const ThemedTextInput = withUnistyles(TextInput);
|
const ThemedTextInput = withUnistyles(TextInput);
|
||||||
|
|
||||||
const iconForegroundMapping = (theme: Theme) => ({ color: theme.colors.foreground });
|
const iconForegroundMapping = (theme: Theme) => ({ color: theme.colors.foreground });
|
||||||
const iconForegroundMutedMapping = (theme: Theme) => ({ color: theme.colors.foregroundMuted });
|
const iconForegroundMutedMapping = (theme: Theme) => ({ color: theme.colors.foregroundMuted });
|
||||||
|
const iconAccentForegroundMapping = (theme: Theme) => ({ color: theme.colors.accentForeground });
|
||||||
const textInputPlaceholderColorMapping = (theme: Theme) => ({
|
const textInputPlaceholderColorMapping = (theme: Theme) => ({
|
||||||
placeholderTextColor: theme.colors.surface4,
|
placeholderTextColor: theme.colors.surface4,
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -235,6 +235,7 @@ interface DarkThemeConfig {
|
|||||||
borderAccent: string;
|
borderAccent: string;
|
||||||
accent: string;
|
accent: string;
|
||||||
accentBright: string;
|
accentBright: string;
|
||||||
|
accentForeground?: string;
|
||||||
destructive: string;
|
destructive: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -277,7 +278,7 @@ function buildDarkSemanticColors(tint: DarkThemeConfig) {
|
|||||||
|
|
||||||
accent: tint.accent,
|
accent: tint.accent,
|
||||||
accentBright: tint.accentBright,
|
accentBright: tint.accentBright,
|
||||||
accentForeground: "#ffffff",
|
accentForeground: tint.accentForeground ?? "#ffffff",
|
||||||
|
|
||||||
destructive: tint.destructive,
|
destructive: tint.destructive,
|
||||||
destructiveForeground: "#ffffff",
|
destructiveForeground: "#ffffff",
|
||||||
@@ -352,8 +353,9 @@ const zincDarkColors = buildDarkSemanticColors({
|
|||||||
scrollbarHandle: "#71717a",
|
scrollbarHandle: "#71717a",
|
||||||
border: "#27272a",
|
border: "#27272a",
|
||||||
borderAccent: "#303036",
|
borderAccent: "#303036",
|
||||||
accent: "#20744A",
|
accent: "#e4e4e7",
|
||||||
accentBright: "#7ccba0",
|
accentBright: "#fafafa",
|
||||||
|
accentForeground: "#18181b", // monochrome zinc accent is near-white — needs dark text
|
||||||
destructive: "#c44a4a", // neutral red, hue 0 — clearly red without screaming
|
destructive: "#c44a4a", // neutral red, hue 0 — clearly red without screaming
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user