Subpixel with opaque background color

This commit is contained in:
CHaBou 2018-02-18 13:28:26 +01:00 committed by GitHub
parent 8ebdaebdfa
commit 137db6cdd9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -19,7 +19,8 @@ const CURSOR_STYLES = {
const getTermOptions = props => { const getTermOptions = props => {
// Set a background color only if it is opaque // 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 { return {
macOptionIsMeta: props.modifierKeys.altIsMeta, macOptionIsMeta: props.modifierKeys.altIsMeta,
cursorStyle: CURSOR_STYLES[props.cursorShape], cursorStyle: CURSOR_STYLES[props.cursorShape],
@ -28,7 +29,7 @@ const getTermOptions = props => {
fontSize: props.fontSize, fontSize: props.fontSize,
fontWeight: props.fontWeight, fontWeight: props.fontWeight,
fontWeightBold: props.fontWeightBold, fontWeightBold: props.fontWeightBold,
allowTransparency: true, allowTransparency: needTransparency,
theme: { theme: {
foreground: props.foregroundColor, foreground: props.foregroundColor,
background: backgroundColor, background: backgroundColor,