Merge pull request #98974 from ChrisPapp/highlight_color_97521

Prevent opaque highlight color from hiding text
This commit is contained in:
Daniel Imms 2020-06-01 15:39:08 -07:00 committed by GitHub
commit cc09e1d5ba
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -212,8 +212,11 @@ class CompositeMouseTracker extends Widget {
registerThemingParticipant((theme, collector) => {
const editorHoverHighlightColor = theme.getColor(editorHoverHighlight);
let editorHoverHighlightColor = theme.getColor(editorHoverHighlight);
if (editorHoverHighlightColor) {
if (editorHoverHighlightColor.isOpaque()) {
editorHoverHighlightColor = editorHoverHighlightColor.transparent(0.5);
}
collector.addRule(`.integrated-terminal .hoverHighlight { background-color: ${editorHoverHighlightColor}; }`);
}
const hoverBackground = theme.getColor(editorHoverBackground);