Skip to content

Commit

Permalink
Use widgetClose icon in banner part
Browse files Browse the repository at this point in the history
  • Loading branch information
aeschli committed Nov 11, 2021
1 parent 5c720d5 commit 0db54ee
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions src/vs/workbench/browser/parts/banner/bannerPart.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,11 @@ import 'vs/css!./media/bannerpart';
import { localize } from 'vs/nls';
import { $, addDisposableListener, append, asCSSUrl, clearNode, EventType } from 'vs/base/browser/dom';
import { ActionBar } from 'vs/base/browser/ui/actionbar/actionbar';
import { Codicon, registerCodicon } from 'vs/base/common/codicons';
import { Codicon } from 'vs/base/common/codicons';
import { registerSingleton } from 'vs/platform/instantiation/common/extensions';
import { IInstantiationService, ServicesAccessor } from 'vs/platform/instantiation/common/instantiation';
import { IStorageService } from 'vs/platform/storage/common/storage';
import { IThemeService, registerThemingParticipant } from 'vs/platform/theme/common/themeService';
import { IThemeService, registerThemingParticipant, ThemeIcon } from 'vs/platform/theme/common/themeService';
import { Part } from 'vs/workbench/browser/part';
import { IWorkbenchLayoutService, Parts } from 'vs/workbench/services/layout/browser/layoutService';
import { Action } from 'vs/base/common/actions';
Expand All @@ -27,12 +27,7 @@ import { KeybindingsRegistry, KeybindingWeight } from 'vs/platform/keybinding/co
import { KeyCode } from 'vs/base/common/keyCodes';
import { IContextKeyService, RawContextKey } from 'vs/platform/contextkey/common/contextkey';
import { URI } from 'vs/base/common/uri';


// Icons

const bannerCloseIcon = registerCodicon('banner-close', Codicon.close);

import { widgetClose } from 'vs/platform/theme/common/iconRegistry';

// Theme support

Expand Down Expand Up @@ -257,7 +252,7 @@ export class BannerPart extends Part implements IBannerService {
// Action
const actionBarContainer = append(this.element, $('div.action-container'));
this.actionBar = this._register(new ActionBar(actionBarContainer));
const closeAction = this._register(new Action('banner.close', 'Close Banner', bannerCloseIcon.classNames, true, () => this.close(item)));
const closeAction = this._register(new Action('banner.close', 'Close Banner', ThemeIcon.asClassName(widgetClose), true, () => this.close(item)));
this.actionBar.push(closeAction, { icon: true, label: false });
this.actionBar.setFocusable(false);

Expand Down

0 comments on commit 0db54ee

Please sign in to comment.