Add minimumContrastRatio to DOM renderer

Part of #322
This commit is contained in:
Daniel Imms
2019-11-11 19:03:12 -08:00
parent 339d4d6a73
commit e46ff9ec85
8 changed files with 209 additions and 30 deletions
+3
View File
@@ -37,6 +37,7 @@ export const DEFAULT_OPTIONS: ITerminalOptions = Object.freeze({
screenReaderMode: false,
macOptionIsMeta: false,
macOptionClickForcesSelection: false,
minimumContrastRatio: 6,
disableStdin: false,
allowTransparency: false,
tabStopWidth: 8,
@@ -116,6 +117,8 @@ export class OptionsService implements IOptionsService {
throw new Error(`${key} cannot be less than 1, value: ${value}`);
}
break;
case 'minimumContrastRatio':
value = Math.max(1, Math.min(21, Math.round(value * 10) / 10));
case 'scrollback':
value = Math.min(value, 4294967295);
if (value < 0) {
+1
View File
@@ -229,6 +229,7 @@ export interface ITerminalOptions {
logLevel: LogLevel;
macOptionIsMeta: boolean;
macOptionClickForcesSelection: boolean;
minimumContrastRatio: number;
rendererType: RendererType;
rightClickSelectsWord: boolean;
rows: number;