Skip to content

Commit

Permalink
Fix search view replace toggle color - #45063
Browse files Browse the repository at this point in the history
  • Loading branch information
roblourens committed Mar 20, 2018
1 parent 581000a commit b497448
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 10 deletions.
4 changes: 2 additions & 2 deletions src/vs/workbench/parts/search/browser/media/searchview.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down
17 changes: 9 additions & 8 deletions src/vs/workbench/parts/search/browser/searchWidget.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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';
Expand All @@ -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';
Expand Down Expand Up @@ -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());
Expand Down

0 comments on commit b497448

Please sign in to comment.