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', autoClose='outside',
container='body', container='body',
#popover='ngbPopover', #popover='ngbPopover',
[title]='hint'
) {{ title }} ) {{ title }}

View File

@ -10,6 +10,7 @@ import { NgbPopover } from '@ng-bootstrap/ng-bootstrap'
export class ColorPickerComponent { export class ColorPickerComponent {
@Input() model: string @Input() model: string
@Input() title: string @Input() title: string
@Input() hint: string
@Output() modelChange = new EventEmitter<string>() @Output() modelChange = new EventEmitter<string>()
@ViewChild('popover') popover: NgbPopover @ViewChild('popover') popover: NgbPopover

View File

@ -26,22 +26,32 @@
[(model)]='config.store.terminal.colorScheme.foreground', [(model)]='config.store.terminal.colorScheme.foreground',
(modelChange)='config.save()', (modelChange)='config.save()',
title='FG', title='FG',
hint='Foreground'
) )
color-picker( color-picker(
[(model)]='config.store.terminal.colorScheme.background', [(model)]='config.store.terminal.colorScheme.background',
(modelChange)='config.save()', (modelChange)='config.save()',
title='BG', title='BG',
hint='Background'
) )
color-picker( color-picker(
[(model)]='config.store.terminal.colorScheme.cursor', [(model)]='config.store.terminal.colorScheme.cursor',
(modelChange)='config.save()', (modelChange)='config.save()',
title='CU', title='CU',
hint='Cursor color'
)
color-picker(
[(model)]='config.store.terminal.colorScheme.cursorAccent',
(modelChange)='config.save()',
title='CA',
hint='Block cursor foreground'
) )
color-picker( color-picker(
*ngFor='let _ of config.store.terminal.colorScheme.colors; let idx = index; trackBy: colorsTrackBy', *ngFor='let _ of config.store.terminal.colorScheme.colors; let idx = index; trackBy: colorsTrackBy',
[(model)]='config.store.terminal.colorScheme.colors[idx]', [(model)]='config.store.terminal.colorScheme.colors[idx]',
(modelChange)='config.save()', (modelChange)='config.save()',
[title]='idx', [title]='idx',
hint='ANSI color {{idx}}'
) )
color-scheme-preview([scheme]='config.store.terminal.colorScheme') 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)', background: 'rgba(38, 50, 56, 1)',
selection: null, selection: null,
cursor: '#FFCC00', cursor: '#FFCC00',
cursorAccent: null,
colors: [ colors: [
'#000000', '#000000',
'#D62341', '#D62341',

View File

@ -289,6 +289,7 @@ export class XTermFrontend extends Frontend {
selection: config.terminal.colorScheme.selection || '#88888888', selection: config.terminal.colorScheme.selection || '#88888888',
background: config.terminal.background === 'colorScheme' ? config.terminal.colorScheme.background : '#00000000', background: config.terminal.background === 'colorScheme' ? config.terminal.colorScheme.background : '#00000000',
cursor: config.terminal.colorScheme.cursor, cursor: config.terminal.colorScheme.cursor,
cursorAccent: config.terminal.colorScheme.cursorAccent,
} }
for (let i = 0; i < COLOR_NAMES.length; i++) { for (let i = 0; i < COLOR_NAMES.length; i++) {