allow customizing selection foreground color

This commit is contained in:
Eugene Pankov 2022-05-21 20:34:19 -07:00
parent 1fb67e1730
commit 12aa28e766
No known key found for this signature in database
GPG Key ID: 5896FCBBDD1CF4F4
4 changed files with 16 additions and 1 deletions

View File

@ -398,7 +398,7 @@ ngx-colors-panel .opened {
background: $body-bg !important;
button {
color: $body-color;
color: $body-color !important;
}
.button svg {

View File

@ -9,4 +9,6 @@ export interface TerminalColorScheme {
background: string
cursor: string
colors: string[]
selection?: string
selectionForeground?: string
}

View File

@ -46,6 +46,18 @@
title='CA',
hint='Block cursor foreground'
)
color-picker(
[(model)]='config.store.terminal.colorScheme.selection',
(modelChange)='config.save()',
title='SB',
hint='Selection background'
)
color-picker(
[(model)]='config.store.terminal.colorScheme.selectionForeground',
(modelChange)='config.save()',
title='SF',
hint='Selection foreground'
)
color-picker(
*ngFor='let _ of config.store.terminal.colorScheme.colors; let idx = index; trackBy: colorsTrackBy',
[(model)]='config.store.terminal.colorScheme.colors[idx]',

View File

@ -341,6 +341,7 @@ export class XTermFrontend extends Frontend {
const theme: ITheme = {
foreground: config.terminal.colorScheme.foreground,
selection: config.terminal.colorScheme.selection || '#88888888',
selectionForeground: config.terminal.colorScheme.selectionForeground || undefined,
background: config.terminal.background === 'colorScheme' ? config.terminal.colorScheme.background : '#00000000',
cursor: config.terminal.colorScheme.cursor,
cursorAccent: config.terminal.colorScheme.cursorAccent,