1
1
mirror of https://github.com/Eugeny/tabby.git synced 2024-12-23 18:44:20 +03:00

fixed #4630 - added theme setting for cursor accent color

This commit is contained in:
Eugene Pankov 2021-09-24 23:12:17 +02:00
parent 9d88db83ee
commit 555a21d648
No known key found for this signature in database
GPG Key ID: 5896FCBBDD1CF4F4
5 changed files with 14 additions and 0 deletions

View File

@ -12,4 +12,5 @@ div(
autoClose='outside',
container='body',
#popover='ngbPopover',
[title]='hint'
) {{ title }}

View File

@ -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<string>()
@ViewChild('popover') popover: NgbPopover

View File

@ -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')

View File

@ -32,6 +32,7 @@ export class TerminalConfigProvider extends ConfigProvider {
background: 'rgba(38, 50, 56, 1)',
selection: null,
cursor: '#FFCC00',
cursorAccent: null,
colors: [
'#000000',
'#D62341',

View File

@ -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++) {