feat(theme): add background image dim scrim slider

New terminal.backgroundImageDim setting (0-90%, default 0 = off). A black
scrim layer sits between the background image and the xterm screen, so
bright wallpapers stay readable at any opacity: unlike the opacity slider
(which blends the image toward the dark dock base), the scrim darkens the
image while preserving its saturation, and the raised minimumContrastRatio
(4.5) keeps lifted text legible on top.

- settings: backgroundImageDim with deepMerge type-fallback sanitize
- TerminalView: render .term-bg-dim only when image set and dim > 0
- ThemeSettingsTab: slider follows the existing draft + onChangeComplete
  pattern (no settings writes while dragging)
- i18n: settings.theme.backgroundImageDim(+Desc) in zh-CN/zh-TW/en/ja
- AGENTS.md: document the third image-mode invariant
This commit is contained in:
Bill committed 2026-10-07 21:24:27 +08:00
1 parent e16c860c7a
commit 6c04f0e8c1
9 files changed
+53 -2

No files matched your search

+2
View File
@@ -288,6 +288,8 @@ const settings: Record<string, string> = {
'settings.theme.chooseImage': 'Choose image',
'settings.theme.clearImage': 'Remove',
'settings.theme.imageOpacity': 'Image opacity',
'settings.theme.backgroundImageDim': 'Background dim',
'settings.theme.backgroundImageDimDesc': 'Overlays a black dim layer on top of the image; text is brightened automatically. 30–50% works well for bright images',
'settings.theme.customBadge': 'Custom',
'settings.theme.deleteTitle': 'Delete custom theme',
'settings.theme.create': 'New theme',