mirror of
https://github.com/quine-global/hyper.git
synced 2026-01-12 20:18:41 -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 => {
|
||||
// Set a background color only if it is opaque
|
||||
const needTransparency = Color(props.backgroundColor).alpha() < 1;
|
||||
const backgroundColor = needTransparency ? 'transparent' : props.backgroundColor;
|
||||
const backgroundColor = needTransparency ? 'rgba(0,0,0,0)' : props.backgroundColor;
|
||||
|
||||
return {
|
||||
macOptionIsMeta: props.modifierKeys.altIsMeta,
|
||||
|
|
|
|||
|
|
@ -23,11 +23,6 @@ class Hyper extends React.PureComponent<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;
|
||||
if (lastConfigUpdate && lastConfigUpdate !== prev.lastConfigUpdate) {
|
||||
this.attachKeyListeners();
|
||||
|
|
@ -96,7 +91,6 @@ class Hyper extends React.PureComponent<HyperProps> {
|
|||
};
|
||||
|
||||
componentWillUnmount() {
|
||||
document.body.style.backgroundColor = 'inherit';
|
||||
this.mousetrap?.reset();
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue