diff --git a/tabby-terminal/src/components/appearanceSettingsTab.component.pug b/tabby-terminal/src/components/appearanceSettingsTab.component.pug index a5975084..0e87e562 100644 --- a/tabby-terminal/src/components/appearanceSettingsTab.component.pug +++ b/tabby-terminal/src/components/appearanceSettingsTab.component.pug @@ -119,6 +119,18 @@ h3.mb-3(translate) Appearance (ngModelChange)='config.save()', ) + .form-line + .header + .title(translate) Minimum contrast ratio + input.form-control( + type='number', + min='1', + max='21', + step='0.5', + [(ngModel)]='config.store.terminal.minimumContrastRatio', + (ngModelChange)='config.save()' + ) + .form-line .header .title(translate) Fallback font diff --git a/tabby-terminal/src/config.ts b/tabby-terminal/src/config.ts index bbcfaffa..1cd6b082 100644 --- a/tabby-terminal/src/config.ts +++ b/tabby-terminal/src/config.ts @@ -69,6 +69,7 @@ export class TerminalConfigProvider extends ConfigProvider { scrollbackLines: 25000, drawBoldTextInBrightColors: true, sixel: true, + minimumContrastRatio: 4, }, } diff --git a/tabby-terminal/src/frontends/xterm.css b/tabby-terminal/src/frontends/xterm.css index 21f9c016..c60099b7 100644 --- a/tabby-terminal/src/frontends/xterm.css +++ b/tabby-terminal/src/frontends/xterm.css @@ -17,18 +17,3 @@ right: 1px; pointer-events: none; } - -.xterm-find-result-decoration { - box-sizing: content-box; - - border-radius: 3px; - padding: 2px; - margin: -2px; - outline: 2px solid yellow; - backdrop-filter: contrast(2); -} - -.xterm-find-active-result-decoration { - backdrop-filter: contrast(4); - outline-width: 2px !important; -} diff --git a/tabby-terminal/src/frontends/xtermFrontend.ts b/tabby-terminal/src/frontends/xtermFrontend.ts index a944a5c7..41048962 100644 --- a/tabby-terminal/src/frontends/xtermFrontend.ts +++ b/tabby-terminal/src/frontends/xtermFrontend.ts @@ -378,6 +378,7 @@ export class XTermFrontend extends Frontend { this.xterm.options.drawBoldTextInBrightColors = config.terminal.drawBoldTextInBrightColors this.xterm.options.fontWeight = config.terminal.fontWeight this.xterm.options.fontWeightBold = config.terminal.fontWeightBold + this.xterm.options.minimumContrastRatio = config.terminal.minimumContrastRatio this.configuredFontSize = config.terminal.fontSize this.configuredLinePadding = config.terminal.linePadding this.setFontSize() @@ -417,11 +418,12 @@ export class XTermFrontend extends Frontend { return { ...searchOptions, decorations: { - matchOverviewRuler: '#cccc00', + matchOverviewRuler: '#888', activeMatchColorOverviewRuler: '#ffff00', - matchBorder: '#cc0', + matchBorder: '#888', + matchBackground: '#888', activeMatchBorder: '#ff0', - activeMatchBackground: 'rgba(255, 255, 0, 0.125)', + activeMatchBackground: '#ff0', }, } }