Make find expand widget button themeable

Fix #120899
This commit is contained in:
Rob Lourens 2021-04-09 20:05:02 -07:00
parent 0b305965c9
commit 148029c535
2 changed files with 11 additions and 11 deletions

View file

@ -289,16 +289,6 @@
box-sizing: border-box;
}
/* Theming */
.monaco-workbench.vs .search-view .search-widget .toggle-replace-button:hover {
background-color: rgba(0, 0, 0, 0.1) !important;
}
.monaco-workbench.vs-dark .search-view .search-widget .toggle-replace-button:hover {
background-color: rgba(255, 255, 255, 0.1) !important;
}
/* High Contrast Theming */
.monaco-workbench.hc-black .search-view .foldermatch,

View file

@ -45,7 +45,7 @@ import { IOpenerService } from 'vs/platform/opener/common/opener';
import { IProgress, IProgressService, IProgressStep } from 'vs/platform/progress/common/progress';
import { IStorageService, StorageScope, StorageTarget } from 'vs/platform/storage/common/storage';
import { ITelemetryService } from 'vs/platform/telemetry/common/telemetry';
import { diffInserted, diffInsertedOutline, diffRemoved, diffRemovedOutline, editorFindMatchHighlight, editorFindMatchHighlightBorder, foreground, listActiveSelectionForeground, textLinkActiveForeground, textLinkForeground } from 'vs/platform/theme/common/colorRegistry';
import { diffInserted, diffInsertedOutline, diffRemoved, diffRemovedOutline, editorFindMatchHighlight, editorFindMatchHighlightBorder, foreground, listActiveSelectionForeground, textLinkActiveForeground, textLinkForeground, toolbarActiveBackground, toolbarHoverBackground } from 'vs/platform/theme/common/colorRegistry';
import { IColorTheme, ICssStyleCollector, IThemeService, registerThemingParticipant, ThemeIcon } from 'vs/platform/theme/common/themeService';
import { IWorkspaceContextService, WorkbenchState } from 'vs/platform/workspace/common/workspace';
import { OpenFileFolderAction, OpenFolderAction } from 'vs/workbench/browser/actions/workspaceActions';
@ -1929,6 +1929,16 @@ registerThemingParticipant((theme: IColorTheme, collector: ICssStyleCollector) =
collector.addRule(`.monaco-workbench .search-view .message a:hover,
.monaco-workbench .search-view .message a:active { color: ${activeLink}; }`);
}
const toolbarHoverColor = theme.getColor(toolbarHoverBackground);
if (toolbarHoverColor) {
collector.addRule(`.monaco-workbench .search-view .search-widget .toggle-replace-button:hover { background-color: ${toolbarHoverColor} }`);
}
const toolbarActiveColor = theme.getColor(toolbarActiveBackground);
if (toolbarActiveColor) {
collector.addRule(`.monaco-workbench .search-view .search-widget .toggle-replace-button:active { background-color: ${toolbarActiveColor} }`);
}
});
class SearchLinkButton extends Disposable {