Remove suggest input transparency to fix #85099

This commit is contained in:
Jackson Kearl
2019-11-19 11:29:13 -08:00
parent fa5ae1ca80
commit bc4550bdae
2 changed files with 9 additions and 5 deletions
@@ -10,8 +10,6 @@
.suggest-input-container .monaco-editor-background,
.suggest-input-container .monaco-editor,
.suggest-input-container .mtk1 {
/* allow the embedded monaco to be styled from the outer context */
background-color: transparent;
color: inherit;
}
@@ -25,4 +23,3 @@
margin-top: 2px;
margin-left: 1px;
}
@@ -224,7 +224,8 @@ export class SuggestEnabledInput extends Widget implements IThemable {
public style(colors: ISuggestEnabledInputStyles): void {
this.stylingContainer.style.backgroundColor = colors.inputBackground ? colors.inputBackground.toString() : '';
this.placeholderText.style.backgroundColor =
this.stylingContainer.style.backgroundColor = colors.inputBackground ? colors.inputBackground.toString() : '';
this.stylingContainer.style.color = colors.inputForeground ? colors.inputForeground.toString() : null;
this.placeholderText.style.color = colors.inputPlaceholderForeground ? colors.inputPlaceholderForeground.toString() : null;
@@ -254,7 +255,7 @@ export class SuggestEnabledInput extends Widget implements IThemable {
public layout(dimension: Dimension): void {
this.inputWidget.layout(dimension);
this.placeholderText.style.width = `${dimension.width}px`;
this.placeholderText.style.width = `${dimension.width - 2}px`;
}
private selectAll(): void {
@@ -286,6 +287,12 @@ registerThemingParticipant((theme, collector) => {
if (inputForegroundColor) {
collector.addRule(`.suggest-input-container .monaco-editor .view-line span.inline-selected-text { color: ${inputForegroundColor}; }`);
}
const backgroundColor = theme.getColor(inputBackground);
if (backgroundColor) {
collector.addRule(`.suggest-input-container .monaco-editor-background { background-color: ${backgroundColor}; } `);
collector.addRule(`.suggest-input-container .monaco-editor { background-color: ${backgroundColor}; } `);
}
});