From b497448a8d96c165de785ac3a20058ac411ec090 Mon Sep 17 00:00:00 2001 From: Rob Lourens Date: Tue, 20 Mar 2018 16:47:22 -0700 Subject: [PATCH] Fix search view replace toggle color - #45063 --- .../parts/search/browser/media/searchview.css | 4 ++-- .../parts/search/browser/searchWidget.ts | 17 +++++++++-------- 2 files changed, 11 insertions(+), 10 deletions(-) diff --git a/src/vs/workbench/parts/search/browser/media/searchview.css b/src/vs/workbench/parts/search/browser/media/searchview.css index d42b6004296..f8c247cb778 100644 --- a/src/vs/workbench/parts/search/browser/media/searchview.css +++ b/src/vs/workbench/parts/search/browser/media/searchview.css @@ -366,11 +366,11 @@ /* Theming */ -.vs .viewlet .search-view .search-widget .toggle-replace-button:hover { +.vs .search-view .search-widget .toggle-replace-button:hover { background-color: rgba(0, 0, 0, 0.1) !important; } -.vs-dark .viewlet .search-view .search-widget .toggle-replace-button:hover { +.vs-dark .search-view .search-widget .toggle-replace-button:hover { background-color: rgba(255, 255, 255, 0.1) !important; } diff --git a/src/vs/workbench/parts/search/browser/searchWidget.ts b/src/vs/workbench/parts/search/browser/searchWidget.ts index e71f6ddd553..4c4edcbcd6e 100644 --- a/src/vs/workbench/parts/search/browser/searchWidget.ts +++ b/src/vs/workbench/parts/search/browser/searchWidget.ts @@ -12,7 +12,7 @@ import { Action } from 'vs/base/common/actions'; import { ActionBar } from 'vs/base/browser/ui/actionbar/actionbar'; import { FindInput, IFindInputOptions } from 'vs/base/browser/ui/findinput/findInput'; import { InputBox, IMessage } from 'vs/base/browser/ui/inputbox/inputBox'; -import { Button } from 'vs/base/browser/ui/button/button'; +import { Button, IButtonOptions } from 'vs/base/browser/ui/button/button'; import { IKeyboardEvent } from 'vs/base/browser/keyboardEvent'; import { KeybindingsRegistry } from 'vs/platform/keybinding/common/keybindingsRegistry'; import { IKeybindingService } from 'vs/platform/keybinding/common/keybinding'; @@ -25,9 +25,8 @@ import { IViewletService } from 'vs/workbench/services/viewlet/browser/viewlet'; import { isSearchViewFocused, appendKeyBindingLabel } from 'vs/workbench/parts/search/browser/searchActions'; import { HistoryNavigator } from 'vs/base/common/history'; import * as Constants from 'vs/workbench/parts/search/common/constants'; -import { attachInputBoxStyler, attachFindInputBoxStyler, attachButtonStyler } from 'vs/platform/theme/common/styler'; +import { attachInputBoxStyler, attachFindInputBoxStyler } from 'vs/platform/theme/common/styler'; import { IThemeService } from 'vs/platform/theme/common/themeService'; -import { SIDE_BAR_BACKGROUND } from 'vs/workbench/common/theme'; import { CONTEXT_FIND_WIDGET_NOT_VISIBLE } from 'vs/editor/contrib/find/findModel'; import { IClipboardService } from 'vs/platform/clipboard/common/clipboardService'; import { IConfigurationService } from 'vs/platform/configuration/common/configuration'; @@ -217,11 +216,13 @@ export class SearchWidget extends Widget { } private renderToggleReplaceButton(parent: HTMLElement): void { - this.toggleReplaceButton = this._register(new Button(parent)); - attachButtonStyler(this.toggleReplaceButton, this.themeService, { - buttonBackground: SIDE_BAR_BACKGROUND, - buttonHoverBackground: SIDE_BAR_BACKGROUND - }); + const opts: IButtonOptions = { + buttonBackground: null, + buttonBorder: null, + buttonForeground: null, + buttonHoverBackground: null + }; + this.toggleReplaceButton = this._register(new Button(parent, opts)); this.toggleReplaceButton.icon = 'toggle-replace-button collapse'; // TODO@joh need to dispose this listener eventually this.toggleReplaceButton.onDidClick(() => this.onToggleReplaceButton()); -- GitLab