Skip to content

Commit 1d362fa

Browse files
author
Benjamin Pasero
committed
quick pick - push down picker foreground/background colors
1 parent a8cb5b4 commit 1d362fa

4 files changed

Lines changed: 14 additions & 24 deletions

File tree

src/vs/platform/theme/common/colorRegistry.ts

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -227,9 +227,6 @@ export const simpleCheckboxForeground = registerColor('checkbox.foreground', { d
227227
export const simpleCheckboxBorder = registerColor('checkbox.border', { dark: selectBorder, light: selectBorder, hc: selectBorder }, nls.localize('checkbox.border', "Border color of checkbox widget."));
228228

229229

230-
export const pickerGroupForeground = registerColor('pickerGroup.foreground', { dark: '#3794FF', light: '#0066BF', hc: Color.white }, nls.localize('pickerGroupForeground', "Quick picker color for grouping labels."));
231-
export const pickerGroupBorder = registerColor('pickerGroup.border', { dark: '#3F3F46', light: '#CCCEDB', hc: Color.white }, nls.localize('pickerGroupBorder', "Quick picker color for grouping borders."));
232-
233230
export const buttonForeground = registerColor('button.foreground', { dark: Color.white, light: Color.white, hc: Color.white }, nls.localize('buttonForeground', "Button foreground color."));
234231
export const buttonBackground = registerColor('button.background', { dark: '#0E639C', light: '#007ACC', hc: null }, nls.localize('buttonBackground', "Button background color."));
235232
export const buttonHoverBackground = registerColor('button.hoverBackground', { dark: lighten(buttonBackground, 0.2), light: darken(buttonBackground, 0.2), hc: null }, nls.localize('buttonHoverBackground', "Button background color when hovering."));
@@ -278,6 +275,14 @@ export const editorWidgetBorder = registerColor('editorWidget.border', { dark: '
278275

279276
export const editorWidgetResizeBorder = registerColor('editorWidget.resizeBorder', { light: null, dark: null, hc: null }, nls.localize('editorWidgetResizeBorder', "Border color of the resize bar of editor widgets. The color is only used if the widget chooses to have a resize border and if the color is not overridden by a widget."));
280277

278+
/**
279+
* Quick pick widget
280+
*/
281+
export const quickInputBackground = registerColor('quickInput.background', { dark: editorWidgetBackground, light: editorWidgetBackground, hc: editorWidgetBackground }, nls.localize('pickerBackground', "Quick picker background color. The quick picker widget is the container for pickers like the command palette."));
282+
export const quickInputForeground = registerColor('quickInput.foreground', { dark: editorWidgetForeground, light: editorWidgetForeground, hc: editorWidgetForeground }, nls.localize('pickerForeground', "Quick picker foreground color. The quick picker widget is the container for pickers like the command palette."));
283+
export const pickerGroupForeground = registerColor('pickerGroup.foreground', { dark: '#3794FF', light: '#0066BF', hc: Color.white }, nls.localize('pickerGroupForeground', "Quick picker color for grouping labels."));
284+
export const pickerGroupBorder = registerColor('pickerGroup.border', { dark: '#3F3F46', light: '#CCCEDB', hc: Color.white }, nls.localize('pickerGroupBorder', "Quick picker color for grouping borders."));
285+
281286
/**
282287
* Editor selection colors.
283288
*/

src/vs/workbench/browser/parts/quickinput/quickInput.ts

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,7 @@ import { IQuickInputService, IQuickPickItem, IPickOptions, IInputOptions, IQuick
77
import { ILayoutService } from 'vs/platform/layout/browser/layoutService';
88
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
99
import { IThemeService } from 'vs/platform/theme/common/themeService';
10-
import { inputBackground, inputForeground, inputBorder, inputValidationInfoBackground, inputValidationInfoForeground, inputValidationInfoBorder, inputValidationWarningBackground, inputValidationWarningForeground, inputValidationWarningBorder, inputValidationErrorBackground, inputValidationErrorForeground, inputValidationErrorBorder, badgeBackground, badgeForeground, contrastBorder, buttonForeground, buttonBackground, buttonHoverBackground, progressBarBackground, widgetShadow, listFocusForeground, listFocusBackground, activeContrastBorder, pickerGroupBorder, pickerGroupForeground } from 'vs/platform/theme/common/colorRegistry';
11-
import { QUICK_INPUT_BACKGROUND, QUICK_INPUT_FOREGROUND } from 'vs/workbench/common/theme';
10+
import { inputBackground, inputForeground, inputBorder, inputValidationInfoBackground, inputValidationInfoForeground, inputValidationInfoBorder, inputValidationWarningBackground, inputValidationWarningForeground, inputValidationWarningBorder, inputValidationErrorBackground, inputValidationErrorForeground, inputValidationErrorBorder, badgeBackground, badgeForeground, contrastBorder, buttonForeground, buttonBackground, buttonHoverBackground, progressBarBackground, widgetShadow, listFocusForeground, listFocusBackground, activeContrastBorder, pickerGroupBorder, pickerGroupForeground, quickInputForeground, quickInputBackground } from 'vs/platform/theme/common/colorRegistry';
1211
import { IQuickOpenService } from 'vs/platform/quickOpen/common/quickOpen';
1312
import { CancellationToken } from 'vs/base/common/cancellation';
1413
import { KeyCode, KeyMod } from 'vs/base/common/keyCodes';
@@ -174,8 +173,8 @@ export class QuickInputService extends PlatformQuickInputService {
174173
widget: {
175174
titleColor: { dark: 'rgba(255, 255, 255, 0.105)', light: 'rgba(0,0,0,.06)', hc: 'black' }[this.theme.type], // TODO
176175
...computeStyles(this.theme, {
177-
quickInputBackground: QUICK_INPUT_BACKGROUND,
178-
quickInputForeground: QUICK_INPUT_FOREGROUND,
176+
quickInputBackground,
177+
quickInputForeground,
179178
contrastBorder,
180179
widgetShadow,
181180
}),
@@ -209,7 +208,7 @@ export class QuickInputService extends PlatformQuickInputService {
209208
progressBarBackground
210209
}),
211210
list: computeStyles(this.theme, {
212-
listBackground: QUICK_INPUT_BACKGROUND,
211+
listBackground: quickInputBackground,
213212
// Look like focused when inactive.
214213
listInactiveFocusForeground: listFocusForeground,
215214
listInactiveFocusBackground: listFocusBackground,

src/vs/workbench/browser/parts/quickopen/quickOpenController.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ import { IInstantiationService } from 'vs/platform/instantiation/common/instanti
3434
import { IContextKeyService, RawContextKey, IContextKey } from 'vs/platform/contextkey/common/contextkey';
3535
import { IHistoryService } from 'vs/workbench/services/history/common/history';
3636
import { IThemeService } from 'vs/platform/theme/common/themeService';
37-
import { QUICK_INPUT_BACKGROUND, QUICK_INPUT_FOREGROUND } from 'vs/workbench/common/theme';
37+
import { quickInputBackground, quickInputForeground } from 'vs/platform/theme/common/colorRegistry';
3838
import { attachQuickOpenStyler } from 'vs/platform/theme/common/styler';
3939
import { IEnvironmentService } from 'vs/platform/environment/common/environment';
4040
import { IFileService } from 'vs/platform/files/common/files';
@@ -188,7 +188,7 @@ export class QuickOpenController extends Component implements IQuickOpenService
188188
keyboardSupport: false,
189189
treeCreator: (container, config, opts) => this.instantiationService.createInstance(WorkbenchTree, container, config, opts)
190190
}));
191-
this._register(attachQuickOpenStyler(this.quickOpenWidget, this.themeService, { background: QUICK_INPUT_BACKGROUND, foreground: QUICK_INPUT_FOREGROUND }));
191+
this._register(attachQuickOpenStyler(this.quickOpenWidget, this.themeService, { background: quickInputBackground, foreground: quickInputForeground }));
192192

193193
const quickOpenContainer = this.quickOpenWidget.create();
194194
addClass(quickOpenContainer, 'show-file-icons');

src/vs/workbench/common/theme.ts

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -460,20 +460,6 @@ export const SIDE_BAR_SECTION_HEADER_BORDER = registerColor('sideBarSectionHeade
460460
}, nls.localize('sideBarSectionHeaderBorder', "Side bar section header border color. The side bar is the container for views like explorer and search."));
461461

462462

463-
// < --- Quick Input -- >
464-
465-
export const QUICK_INPUT_BACKGROUND = registerColor('quickInput.background', {
466-
dark: SIDE_BAR_BACKGROUND,
467-
light: SIDE_BAR_BACKGROUND,
468-
hc: SIDE_BAR_BACKGROUND
469-
}, nls.localize('quickInputBackground', "Quick Input background color. The Quick Input widget is the container for views like the color theme picker."));
470-
471-
export const QUICK_INPUT_FOREGROUND = registerColor('quickInput.foreground', {
472-
dark: SIDE_BAR_FOREGROUND,
473-
light: SIDE_BAR_FOREGROUND,
474-
hc: SIDE_BAR_FOREGROUND
475-
}, nls.localize('quickInputForeground', "Quick Input foreground color. The Quick Input widget is the container for views like the color theme picker."));
476-
477463
// < --- Title Bar --- >
478464

479465
export const TITLE_BAR_ACTIVE_FOREGROUND = registerColor('titleBar.activeForeground', {

0 commit comments

Comments
 (0)