SuggestEnabledInput - account for slightly transparent text selection, when matching native text selection

This commit is contained in:
Rob Lourens
2018-10-02 15:42:33 -07:00
parent ff957050db
commit f40ca995d5

View File

@@ -247,15 +247,15 @@ export class SuggestEnabledInput extends Widget implements IThemable {
// Override styles in selections.ts // Override styles in selections.ts
registerThemingParticipant((theme, collector) => { registerThemingParticipant((theme, collector) => {
let workbenchSelectionColor = theme.getColor(selectionBackground); const workbenchSelectionColor = theme.getColor(selectionBackground);
if (workbenchSelectionColor) { if (workbenchSelectionColor) {
collector.addRule(`.suggest-input-container .monaco-editor .focused .selected-text { background-color: ${workbenchSelectionColor}; }`); collector.addRule(`.suggest-input-container .monaco-editor .focused .selected-text { background-color: ${workbenchSelectionColor.transparent(.4)}; }`);
} }
// Override inactive selection bg // Override inactive selection bg
const inputBackgroundColor = theme.getColor(inputBackground); const inputBackgroundColor = theme.getColor(inputBackground);
if (inputBackground) { if (inputBackground) {
collector.addRule(`.suggest-input-container .monaco-editor .selected-text { background-color: ${inputBackgroundColor}; }`); collector.addRule(`.suggest-input-container .monaco-editor .selected-text { background-color: ${inputBackgroundColor.transparent(.4)}; }`);
} }
// Override selected fg // Override selected fg