ui(polish) blend background color with theme (#18802)

This commit is contained in:
Jacob Richman
2026-02-12 11:56:07 -08:00
committed by GitHub
parent db00c5abf3
commit 207ac6f2dc
20 changed files with 432 additions and 240 deletions

View File

@@ -54,18 +54,17 @@ export async function setupTerminalAndTheme(
}
config.setTerminalBackground(terminalBackground);
themeManager.setTerminalBackground(terminalBackground);
if (terminalBackground !== undefined) {
const currentTheme = themeManager.getActiveTheme();
if (currentTheme.type !== 'ansi' && currentTheme.type !== 'custom') {
if (!themeManager.isThemeCompatible(currentTheme, terminalBackground)) {
const backgroundType =
getThemeTypeFromBackgroundColor(terminalBackground);
if (backgroundType && currentTheme.type !== backgroundType) {
coreEvents.emitFeedback(
'warning',
`Theme '${currentTheme.name}' (${currentTheme.type}) might look incorrect on your ${backgroundType} terminal background. Type /theme to change theme.`,
);
}
coreEvents.emitFeedback(
'warning',
`Theme '${currentTheme.name}' (${currentTheme.type}) might look incorrect on your ${backgroundType} terminal background. Type /theme to change theme.`,
);
}
}