From 555a21d648eb972456185cda54f2f1a66456114c Mon Sep 17 00:00:00 2001 From: Eugene Pankov Date: Fri, 24 Sep 2021 23:12:17 +0200 Subject: [PATCH] fixed #4630 - added theme setting for cursor accent color --- .../src/components/colorPicker.component.pug | 1 + tabby-terminal/src/components/colorPicker.component.ts | 1 + .../components/colorSchemeSettingsTab.component.pug | 10 ++++++++++ tabby-terminal/src/config.ts | 1 + tabby-terminal/src/frontends/xtermFrontend.ts | 1 + 5 files changed, 14 insertions(+) diff --git a/tabby-terminal/src/components/colorPicker.component.pug b/tabby-terminal/src/components/colorPicker.component.pug index 192bac47..33ccec31 100644 --- a/tabby-terminal/src/components/colorPicker.component.pug +++ b/tabby-terminal/src/components/colorPicker.component.pug @@ -12,4 +12,5 @@ div( autoClose='outside', container='body', #popover='ngbPopover', + [title]='hint' ) {{ title }} diff --git a/tabby-terminal/src/components/colorPicker.component.ts b/tabby-terminal/src/components/colorPicker.component.ts index bc1e81a8..6ea7eb1e 100644 --- a/tabby-terminal/src/components/colorPicker.component.ts +++ b/tabby-terminal/src/components/colorPicker.component.ts @@ -10,6 +10,7 @@ import { NgbPopover } from '@ng-bootstrap/ng-bootstrap' export class ColorPickerComponent { @Input() model: string @Input() title: string + @Input() hint: string @Output() modelChange = new EventEmitter() @ViewChild('popover') popover: NgbPopover diff --git a/tabby-terminal/src/components/colorSchemeSettingsTab.component.pug b/tabby-terminal/src/components/colorSchemeSettingsTab.component.pug index 33e548a5..210bff6c 100644 --- a/tabby-terminal/src/components/colorSchemeSettingsTab.component.pug +++ b/tabby-terminal/src/components/colorSchemeSettingsTab.component.pug @@ -26,22 +26,32 @@ [(model)]='config.store.terminal.colorScheme.foreground', (modelChange)='config.save()', title='FG', + hint='Foreground' ) color-picker( [(model)]='config.store.terminal.colorScheme.background', (modelChange)='config.save()', title='BG', + hint='Background' ) color-picker( [(model)]='config.store.terminal.colorScheme.cursor', (modelChange)='config.save()', title='CU', + hint='Cursor color' + ) + color-picker( + [(model)]='config.store.terminal.colorScheme.cursorAccent', + (modelChange)='config.save()', + title='CA', + hint='Block cursor foreground' ) color-picker( *ngFor='let _ of config.store.terminal.colorScheme.colors; let idx = index; trackBy: colorsTrackBy', [(model)]='config.store.terminal.colorScheme.colors[idx]', (modelChange)='config.save()', [title]='idx', + hint='ANSI color {{idx}}' ) color-scheme-preview([scheme]='config.store.terminal.colorScheme') diff --git a/tabby-terminal/src/config.ts b/tabby-terminal/src/config.ts index 12a1951c..8465a811 100644 --- a/tabby-terminal/src/config.ts +++ b/tabby-terminal/src/config.ts @@ -32,6 +32,7 @@ export class TerminalConfigProvider extends ConfigProvider { background: 'rgba(38, 50, 56, 1)', selection: null, cursor: '#FFCC00', + cursorAccent: null, colors: [ '#000000', '#D62341', diff --git a/tabby-terminal/src/frontends/xtermFrontend.ts b/tabby-terminal/src/frontends/xtermFrontend.ts index 32ba2ff0..e984f42c 100644 --- a/tabby-terminal/src/frontends/xtermFrontend.ts +++ b/tabby-terminal/src/frontends/xtermFrontend.ts @@ -289,6 +289,7 @@ export class XTermFrontend extends Frontend { selection: config.terminal.colorScheme.selection || '#88888888', background: config.terminal.background === 'colorScheme' ? config.terminal.colorScheme.background : '#00000000', cursor: config.terminal.colorScheme.cursor, + cursorAccent: config.terminal.colorScheme.cursorAccent, } for (let i = 0; i < COLOR_NAMES.length; i++) {