From 137db6cdd9ab8d4bffeaee2ea6dac3038deeca4d Mon Sep 17 00:00:00 2001 From: CHaBou Date: Sun, 18 Feb 2018 13:28:26 +0100 Subject: [PATCH] Subpixel with opaque background color --- lib/components/term.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/components/term.js b/lib/components/term.js index d103fd55..9684f7ed 100644 --- a/lib/components/term.js +++ b/lib/components/term.js @@ -19,7 +19,8 @@ const CURSOR_STYLES = { const getTermOptions = props => { // Set a background color only if it is opaque - const backgroundColor = Color(props.backgroundColor).alpha() < 1 ? 'transparent' : props.backgroundColor; + const needTransparency = Color(props.backgroundColor).alpha() < 1; + const backgroundColor = needTransparency ? 'transparent' : props.backgroundColor; return { macOptionIsMeta: props.modifierKeys.altIsMeta, cursorStyle: CURSOR_STYLES[props.cursorShape], @@ -28,7 +29,7 @@ const getTermOptions = props => { fontSize: props.fontSize, fontWeight: props.fontWeight, fontWeightBold: props.fontWeightBold, - allowTransparency: true, + allowTransparency: needTransparency, theme: { foreground: props.foregroundColor, background: backgroundColor,