mirror of
https://github.com/quine-global/hyper.git
synced 2026-01-16 13:48:41 -09:00
* Fix inverted text display. Fix #883 * Add a comment explaining setBackgroundColor override
This commit is contained in:
parent
4643099911
commit
48dd4b5c1f
2 changed files with 10 additions and 1 deletions
|
|
@ -37,7 +37,11 @@ export default class Term extends Component {
|
||||||
prefs.set('cursor-color', this.validateColor(props.cursorColor, 'rgba(255,255,255,0.5)'));
|
prefs.set('cursor-color', this.validateColor(props.cursorColor, 'rgba(255,255,255,0.5)'));
|
||||||
prefs.set('enable-clipboard-notice', false);
|
prefs.set('enable-clipboard-notice', false);
|
||||||
prefs.set('foreground-color', props.foregroundColor);
|
prefs.set('foreground-color', props.foregroundColor);
|
||||||
prefs.set('background-color', 'transparent');
|
|
||||||
|
// hterm.ScrollPort.prototype.setBackgroundColor is overriden
|
||||||
|
// to make hterm's background transparent. we still need to set
|
||||||
|
// background-color for proper text rendering
|
||||||
|
prefs.set('background-color', props.backgroundColor);
|
||||||
prefs.set('color-palette-overrides', getColorList(props.colors));
|
prefs.set('color-palette-overrides', getColorList(props.colors));
|
||||||
prefs.set('user-css', this.getStylesheet(props.customCSS));
|
prefs.set('user-css', this.getStylesheet(props.customCSS));
|
||||||
prefs.set('scrollbar-visible', false);
|
prefs.set('scrollbar-visible', false);
|
||||||
|
|
|
||||||
|
|
@ -207,6 +207,11 @@ hterm.Terminal.prototype.onMouse_ = function (e) {
|
||||||
return oldOnMouse.call(this, e);
|
return oldOnMouse.call(this, e);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// make background transparent to avoid transparency issues
|
||||||
|
hterm.ScrollPort.prototype.setBackgroundColor = function () {
|
||||||
|
this.screen_.style.backgroundColor = 'transparent';
|
||||||
|
};
|
||||||
|
|
||||||
// fixes a bug in hterm, where the shorthand hex
|
// fixes a bug in hterm, where the shorthand hex
|
||||||
// is not properly converted to rgb
|
// is not properly converted to rgb
|
||||||
lib.colors.hexToRGB = function (arg) {
|
lib.colors.hexToRGB = function (arg) {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue