diff --git a/src/vs/editor/contrib/peekView/peekView.ts b/src/vs/editor/contrib/peekView/peekView.ts index e13709fc1de3212affb8c1d332885f99770a5862..47fac3224d0874f2f0a9dc735573e016060f6996 100644 --- a/src/vs/editor/contrib/peekView/peekView.ts +++ b/src/vs/editor/contrib/peekView/peekView.ts @@ -187,7 +187,7 @@ export abstract class PeekViewWidget extends ZoneWidget { this._actionbarWidget = new ActionBar(actionsContainer, actionBarOptions); this._disposables.add(this._actionbarWidget); - this._actionbarWidget.push(new Action('peekview.close', nls.localize('label.close', "Close"), 'codicon-close', true, () => { + this._actionbarWidget.push(new Action('peekview.close', nls.localize('label.close', "Close"), Codicon.close.classNames, true, () => { this.dispose(); return Promise.resolve(); }), { label: false, icon: true }); diff --git a/src/vs/editor/contrib/quickAccess/gotoSymbolQuickAccess.ts b/src/vs/editor/contrib/quickAccess/gotoSymbolQuickAccess.ts index b3aada8b85447207806e10ebda4a9d87c73732c2..52f4fdb13ee2af7cf1e014b539336df283c66289 100644 --- a/src/vs/editor/contrib/quickAccess/gotoSymbolQuickAccess.ts +++ b/src/vs/editor/contrib/quickAccess/gotoSymbolQuickAccess.ts @@ -304,7 +304,7 @@ export abstract class AbstractGotoSymbolQuickAccessProvider extends AbstractEdit return [ { - iconClass: openSideBySideDirection === 'right' ? 'codicon-split-horizontal' : 'codicon-split-vertical', + iconClass: openSideBySideDirection === 'right' ? Codicon.splitHorizontal.classNames : Codicon.splitVertical.classNames, tooltip: openSideBySideDirection === 'right' ? localize('openToSide', "Open to the Side") : localize('openToBottom', "Open to the Bottom") } ]; diff --git a/src/vs/workbench/browser/actions/windowActions.ts b/src/vs/workbench/browser/actions/windowActions.ts index c15ebec6a93cb5b281903082f74098ddd0ddf8fa..5ce9daaff3f1f4a29e30156e377ab9a4fade5244 100644 --- a/src/vs/workbench/browser/actions/windowActions.ts +++ b/src/vs/workbench/browser/actions/windowActions.ts @@ -30,6 +30,7 @@ import { ContextKeyExpr } from 'vs/platform/contextkey/common/contextkey'; import { inQuickPickContext, getQuickNavigateHandler } from 'vs/workbench/browser/quickaccess'; import { IHostService } from 'vs/workbench/services/host/browser/host'; import { ResourceMap } from 'vs/base/common/map'; +import { Codicon } from 'vs/base/common/codicons'; export const inRecentFilesPickerContextKey = 'inRecentFilesPicker'; @@ -41,12 +42,12 @@ interface IRecentlyOpenedPick extends IQuickPickItem { abstract class BaseOpenRecentAction extends Action { private readonly removeFromRecentlyOpened: IQuickInputButton = { - iconClass: 'codicon-close', + iconClass: Codicon.removeClose.classNames, tooltip: nls.localize('remove', "Remove from Recently Opened") }; private readonly dirtyRecentlyOpened: IQuickInputButton = { - iconClass: 'dirty-workspace codicon-circle-filled', + iconClass: 'dirty-workspace ' + Codicon.closeDirty.classNames, tooltip: nls.localize('dirtyRecentlyOpened', "Workspace With Dirty Files"), alwaysVisible: true }; diff --git a/src/vs/workbench/browser/parts/editor/editorActions.ts b/src/vs/workbench/browser/parts/editor/editorActions.ts index 1658e7a8e8c64107b9888128db93d909329b9662..a59f1f9fde225b1b1bb37528a26e5176a7f5e612 100644 --- a/src/vs/workbench/browser/parts/editor/editorActions.ts +++ b/src/vs/workbench/browser/parts/editor/editorActions.ts @@ -20,6 +20,7 @@ import { IFileDialogService, ConfirmResult } from 'vs/platform/dialogs/common/di import { IWorkingCopyService } from 'vs/workbench/services/workingCopy/common/workingCopyService'; import { ItemActivation, IQuickInputService } from 'vs/platform/quickinput/common/quickInput'; import { AllEditorsByMostRecentlyUsedQuickAccess, ActiveGroupEditorsByMostRecentlyUsedQuickAccess, AllEditorsByAppearanceQuickAccess } from 'vs/workbench/browser/parts/editor/editorQuickAccess'; +import { Codicon } from 'vs/base/common/codicons'; export class ExecuteCommandAction extends Action { @@ -395,7 +396,7 @@ export class CloseEditorAction extends Action { label: string, @ICommandService private readonly commandService: ICommandService ) { - super(id, label, 'codicon-close'); + super(id, label, Codicon.close.classNames); } run(context?: IEditorCommandsContext): Promise { @@ -413,7 +414,7 @@ export class CloseOneEditorAction extends Action { label: string, @IEditorGroupsService private readonly editorGroupService: IEditorGroupsService ) { - super(id, label, 'codicon-close'); + super(id, label, Codicon.close.classNames); } async run(context?: IEditorCommandsContext): Promise { @@ -609,7 +610,7 @@ export class CloseAllEditorsAction extends BaseCloseAllAction { @IEditorGroupsService editorGroupService: IEditorGroupsService, @IEditorService editorService: IEditorService ) { - super(id, label, 'codicon-close-all', workingCopyService, fileDialogService, editorGroupService, editorService); + super(id, label, Codicon.closeAll.classNames, workingCopyService, fileDialogService, editorGroupService, editorService); } protected async doCloseAll(): Promise { diff --git a/src/vs/workbench/browser/parts/editor/editorGroupView.ts b/src/vs/workbench/browser/parts/editor/editorGroupView.ts index ecbc051860c45f328c561712d7b2eae839008af3..be4969818dd553e73c21a5ed679c987bb8d07dbe 100644 --- a/src/vs/workbench/browser/parts/editor/editorGroupView.ts +++ b/src/vs/workbench/browser/parts/editor/editorGroupView.ts @@ -51,6 +51,7 @@ import { Schemas } from 'vs/base/common/network'; import { EditorActivation, EditorOpenContext } from 'vs/platform/editor/common/editor'; import { IDialogService, IFileDialogService, ConfirmResult } from 'vs/platform/dialogs/common/dialogs'; import { ILogService } from 'vs/platform/log/common/log'; +import { Codicon } from 'vs/base/common/codicons'; export class EditorGroupView extends Themable implements IEditorGroupView { @@ -290,7 +291,7 @@ export class EditorGroupView extends Themable implements IEditorGroupView { const removeGroupAction = this._register(new Action( CLOSE_EDITOR_GROUP_COMMAND_ID, localize('closeGroupAction', "Close"), - 'codicon-close', + Codicon.close.classNames, true, async () => this.accessor.removeGroup(this))); diff --git a/src/vs/workbench/browser/parts/editor/editorQuickAccess.ts b/src/vs/workbench/browser/parts/editor/editorQuickAccess.ts index 5c9492364491b506a9fffadc712791ff32e419fa..60e46cc5c0230bcca163d006f6b3cb9c7f5fddd8 100644 --- a/src/vs/workbench/browser/parts/editor/editorQuickAccess.ts +++ b/src/vs/workbench/browser/parts/editor/editorQuickAccess.ts @@ -16,6 +16,7 @@ import { getIconClasses } from 'vs/editor/common/services/getIconClasses'; import { prepareQuery, scoreItemFuzzy, compareItemsByFuzzyScore, FuzzyScorerCache } from 'vs/base/common/fuzzyScorer'; import { CancellationToken } from 'vs/base/common/cancellation'; import { IDisposable } from 'vs/base/common/lifecycle'; +import { Codicon } from 'vs/base/common/codicons'; interface IEditorQuickPickItem extends IQuickPickItemWithResource, IPickerQuickAccessItem { groupId: GroupIdentifier; @@ -160,7 +161,7 @@ export abstract class BaseEditorQuickAccessProvider extends PickerQuickAccessPro buttons: (() => { return [ { - iconClass: isDirty ? 'dirty-editor codicon-circle-filled' : 'codicon-close', + iconClass: isDirty ? ('dirty-editor ' + Codicon.closeDirty.classNames) : Codicon.close.classNames, tooltip: localize('closeEditor', "Close Editor"), alwaysVisible: isDirty } diff --git a/src/vs/workbench/browser/parts/notifications/notificationsActions.ts b/src/vs/workbench/browser/parts/notifications/notificationsActions.ts index 5318fd1ace08a993ab13055f6cf2bc2a4730c034..a91ba646097670f6ac53d3d4378daa1fb8f16497 100644 --- a/src/vs/workbench/browser/parts/notifications/notificationsActions.ts +++ b/src/vs/workbench/browser/parts/notifications/notificationsActions.ts @@ -12,6 +12,7 @@ import { INotificationService } from 'vs/platform/notification/common/notificati import { CLEAR_NOTIFICATION, EXPAND_NOTIFICATION, COLLAPSE_NOTIFICATION, CLEAR_ALL_NOTIFICATIONS, HIDE_NOTIFICATIONS_CENTER } from 'vs/workbench/browser/parts/notifications/notificationsCommands'; import { ICommandService } from 'vs/platform/commands/common/commands'; import { IClipboardService } from 'vs/platform/clipboard/common/clipboardService'; +import { Codicon } from 'vs/base/common/codicons'; export class ClearNotificationAction extends Action { @@ -23,7 +24,7 @@ export class ClearNotificationAction extends Action { label: string, @ICommandService private readonly commandService: ICommandService ) { - super(id, label, 'codicon-close'); + super(id, label, Codicon.close.classNames); } async run(notification: INotificationViewItem): Promise { diff --git a/src/vs/workbench/browser/parts/panel/panelActions.ts b/src/vs/workbench/browser/parts/panel/panelActions.ts index 1501c87bcce6cf69c06e8626d686d2e021c15af7..acc6a08bc511bde373c04cf3b8be293f24365843 100644 --- a/src/vs/workbench/browser/parts/panel/panelActions.ts +++ b/src/vs/workbench/browser/parts/panel/panelActions.ts @@ -18,6 +18,7 @@ import { IActivity } from 'vs/workbench/common/activity'; import { IEditorGroupsService } from 'vs/workbench/services/editor/common/editorGroupsService'; import { ActivePanelContext, PanelPositionContext } from 'vs/workbench/common/panel'; import { ContextKeyExpression } from 'vs/platform/contextkey/common/contextkey'; +import { Codicon } from 'vs/base/common/codicons'; export class ClosePanelAction extends Action { @@ -29,7 +30,7 @@ export class ClosePanelAction extends Action { name: string, @IWorkbenchLayoutService private readonly layoutService: IWorkbenchLayoutService ) { - super(id, name, 'codicon-close'); + super(id, name, Codicon.close.classNames); } async run(): Promise { diff --git a/src/vs/workbench/contrib/feedback/browser/feedback.ts b/src/vs/workbench/contrib/feedback/browser/feedback.ts index b98b91c634af763d0b0247133c68b103cb132a99..ed00f62c47ddd92e011c9dae9c6123df23dd008f 100644 --- a/src/vs/workbench/contrib/feedback/browser/feedback.ts +++ b/src/vs/workbench/contrib/feedback/browser/feedback.ts @@ -23,6 +23,7 @@ import { IProductService } from 'vs/platform/product/common/productService'; import { IOpenerService } from 'vs/platform/opener/common/opener'; import { StandardKeyboardEvent } from 'vs/base/browser/keyboardEvent'; import { KeyCode } from 'vs/base/common/keyCodes'; +import { Codicon } from 'vs/base/common/codicons'; export interface IFeedback { feedback: string; @@ -115,7 +116,7 @@ export class FeedbackDropdown extends Dropdown { dom.append(this.feedbackForm, dom.$('h2.title')).textContent = nls.localize("label.sendASmile", "Tweet us your feedback."); // Close Button (top right) - const closeBtn = dom.append(this.feedbackForm, dom.$('div.cancel.codicon.codicon-close')); + const closeBtn = dom.append(this.feedbackForm, dom.$('div.cancel' + Codicon.close.cssSelector)); closeBtn.tabIndex = 0; closeBtn.setAttribute('role', 'button'); closeBtn.title = nls.localize('close', "Close"); diff --git a/src/vs/workbench/contrib/files/browser/fileActions.ts b/src/vs/workbench/contrib/files/browser/fileActions.ts index 146ebf56b1e2c12cbc7391f96bb85be8eba48f8b..74b843b62df0e3be51a7e6423d3e91cb09124fc8 100644 --- a/src/vs/workbench/contrib/files/browser/fileActions.ts +++ b/src/vs/workbench/contrib/files/browser/fileActions.ts @@ -50,6 +50,7 @@ import { once } from 'vs/base/common/functional'; import { IEditorOptions } from 'vs/platform/editor/common/editor'; import { IEditorGroup } from 'vs/workbench/services/editor/common/editorGroupsService'; import { FileEditorInput } from 'vs/workbench/contrib/files/common/editors/fileEditorInput'; +import { Codicon } from 'vs/base/common/codicons'; export const NEW_FILE_COMMAND_ID = 'explorer.newFile'; export const NEW_FILE_LABEL = nls.localize('newFile', "New File"); @@ -694,7 +695,7 @@ export class CloseGroupAction extends Action { static readonly LABEL = nls.localize('closeGroup', "Close Group"); constructor(id: string, label: string, @ICommandService private readonly commandService: ICommandService) { - super(id, label, 'codicon-close-all'); + super(id, label, Codicon.closeAll.classNames); } run(context?: unknown): Promise { diff --git a/src/vs/workbench/electron-browser/actions/windowActions.ts b/src/vs/workbench/electron-browser/actions/windowActions.ts index 19e19c5f6b6138cbe8e8aa1e75658ae90083e2a9..255a094fa06e2a478d77cb5ba8d523518c35cd09 100644 --- a/src/vs/workbench/electron-browser/actions/windowActions.ts +++ b/src/vs/workbench/electron-browser/actions/windowActions.ts @@ -22,6 +22,7 @@ import { IConfigurationService } from 'vs/platform/configuration/common/configur import { IElectronService } from 'vs/platform/electron/node/electron'; import { INativeWorkbenchEnvironmentService } from 'vs/workbench/services/environment/electron-browser/environmentService'; import { IWorkbenchEnvironmentService } from 'vs/workbench/services/environment/common/environmentService'; +import { Codicon } from 'vs/base/common/codicons'; export class CloseCurrentWindowAction extends Action { @@ -155,12 +156,12 @@ export class ReloadWindowWithExtensionsDisabledAction extends Action { export abstract class BaseSwitchWindow extends Action { private readonly closeWindowAction: IQuickInputButton = { - iconClass: 'codicon-close', + iconClass: Codicon.removeClose.classNames, tooltip: nls.localize('close', "Close Window") }; private readonly closeDirtyWindowAction: IQuickInputButton = { - iconClass: 'dirty-window codicon-circle-filled', + iconClass: 'dirty-window ' + Codicon.closeDirty, tooltip: nls.localize('close', "Close Window"), alwaysVisible: true }; diff --git a/test/automation/src/search.ts b/test/automation/src/search.ts index 91b986038d5a1dd2b690652c5fcc1e269844cb9c..85df377e2e7a8b7e766ac21af7ac1117f6c7e3e3 100644 --- a/test/automation/src/search.ts +++ b/test/automation/src/search.ts @@ -74,21 +74,21 @@ export class Search extends Viewlet { await retry( () => this.code.waitAndClick(fileMatch), - () => this.code.waitForElement(`${fileMatch} .action-label.codicon.codicon-close`, el => !!el && el.top > 0 && el.left > 0, 10) + () => this.code.waitForElement(`${fileMatch} .action-label.codicon.search-remove`, el => !!el && el.top > 0 && el.left > 0, 10) ); // ¯\_(ツ)_/¯ await new Promise(c => setTimeout(c, 500)); - await this.code.waitAndClick(`${fileMatch} .action-label.codicon.codicon-close`); + await this.code.waitAndClick(`${fileMatch} .action-label.codicon.search-remove`); await this.code.waitForElement(fileMatch, el => !el); } async expandReplace(): Promise { - await this.code.waitAndClick(`${VIEWLET} .search-widget .monaco-button.toggle-replace-button.codicon-chevron-right`); + await this.code.waitAndClick(`${VIEWLET} .search-widget .monaco-button.toggle-replace-button.codicon-search-hide-replace`); } async collapseReplace(): Promise { - await this.code.waitAndClick(`${VIEWLET} .search-widget .monaco-button.toggle-replace-button.codicon-chevron-down`); + await this.code.waitAndClick(`${VIEWLET} .search-widget .monaco-button.toggle-replace-button.codicon-search-show-replace`); } async setReplaceText(text: string): Promise { @@ -100,12 +100,12 @@ export class Search extends Viewlet { await retry( () => this.code.waitAndClick(fileMatch), - () => this.code.waitForElement(`${fileMatch} .action-label.codicon.codicon-replace-all`, el => !!el && el.top > 0 && el.left > 0, 10) + () => this.code.waitForElement(`${fileMatch} .action-label.codicon.codicon-search-replace-all`, el => !!el && el.top > 0 && el.left > 0, 10) ); // ¯\_(ツ)_/¯ await new Promise(c => setTimeout(c, 500)); - await this.code.waitAndClick(`${fileMatch} .action-label.codicon.codicon-replace-all`); + await this.code.waitAndClick(`${fileMatch} .action-label.codicon.codicon-search-replace-all`); } async waitForResultText(text: string): Promise {