mirror of
https://github.com/quine-global/hyper.git
synced 2026-01-16 21:58:39 -09:00
fix xterm transparency
This commit is contained in:
parent
9527757d9b
commit
cb40ca3138
2 changed files with 1 additions and 7 deletions
|
|
@ -46,7 +46,7 @@ const isWebgl2Supported = (() => {
|
||||||
const getTermOptions = (props: TermProps): ITerminalOptions => {
|
const getTermOptions = (props: TermProps): ITerminalOptions => {
|
||||||
// Set a background color only if it is opaque
|
// Set a background color only if it is opaque
|
||||||
const needTransparency = Color(props.backgroundColor).alpha() < 1;
|
const needTransparency = Color(props.backgroundColor).alpha() < 1;
|
||||||
const backgroundColor = needTransparency ? 'transparent' : props.backgroundColor;
|
const backgroundColor = needTransparency ? 'rgba(0,0,0,0)' : props.backgroundColor;
|
||||||
|
|
||||||
return {
|
return {
|
||||||
macOptionIsMeta: props.modifierKeys.altIsMeta,
|
macOptionIsMeta: props.modifierKeys.altIsMeta,
|
||||||
|
|
|
||||||
|
|
@ -23,11 +23,6 @@ class Hyper extends React.PureComponent<HyperProps> {
|
||||||
}
|
}
|
||||||
|
|
||||||
componentDidUpdate(prev: HyperProps) {
|
componentDidUpdate(prev: HyperProps) {
|
||||||
if (this.props.backgroundColor !== prev.backgroundColor) {
|
|
||||||
// this can be removed when `setBackgroundColor` in electron
|
|
||||||
// starts working again
|
|
||||||
document.body.style.backgroundColor = this.props.backgroundColor;
|
|
||||||
}
|
|
||||||
const {lastConfigUpdate} = this.props;
|
const {lastConfigUpdate} = this.props;
|
||||||
if (lastConfigUpdate && lastConfigUpdate !== prev.lastConfigUpdate) {
|
if (lastConfigUpdate && lastConfigUpdate !== prev.lastConfigUpdate) {
|
||||||
this.attachKeyListeners();
|
this.attachKeyListeners();
|
||||||
|
|
@ -96,7 +91,6 @@ class Hyper extends React.PureComponent<HyperProps> {
|
||||||
};
|
};
|
||||||
|
|
||||||
componentWillUnmount() {
|
componentWillUnmount() {
|
||||||
document.body.style.backgroundColor = 'inherit';
|
|
||||||
this.mousetrap?.reset();
|
this.mousetrap?.reset();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue