Make the terminal background theme aware

This commit is contained in:
Daniel Imms
2017-09-02 13:59:22 -07:00
parent 8039fd35e6
commit 4f81cdfe8c
7 changed files with 19 additions and 8 deletions
+5
View File
@@ -4,6 +4,7 @@
import { ITerminal, IViewport } from './Interfaces';
import { CharMeasure } from './utils/CharMeasure';
import { IColorSet } from './renderer/Interfaces';
/**
* Represents the viewport of a terminal, the visible area within the larger buffer of output.
@@ -40,6 +41,10 @@ export class Viewport implements IViewport {
setTimeout(() => this.syncScrollArea(), 0);
}
public onThemeChanged(colors: IColorSet): void {
this.viewportElement.style.backgroundColor = colors.background;
}
/**
* Refreshes row height, setting line-height, viewport height and scroll area height if
* necessary.