Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
sandy081 committed Feb 6, 2019
1 parent d9f81c8 commit 984a3a1
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import { attachInputBoxStyler, attachStylerCallback, attachCheckboxStyler } from
import { IMarkersWorkbenchService } from 'vs/workbench/parts/markers/electron-browser/markers';
import { IDisposable, dispose, toDisposable } from 'vs/base/common/lifecycle';
import { BaseActionItem, ActionItem } from 'vs/base/browser/ui/actionbar/actionbar';
import { badgeBackground, contrastBorder } from 'vs/platform/theme/common/colorRegistry';
import { badgeBackground, badgeForeground, contrastBorder } from 'vs/platform/theme/common/colorRegistry';
import { localize } from 'vs/nls';
import { Checkbox } from 'vs/base/browser/ui/checkbox/checkbox';
import { IInstantiationService } from 'vs/platform/instantiation/common/instantiation';
Expand Down Expand Up @@ -197,15 +197,17 @@ export class MarkersFilterActionItem extends BaseActionItem {

private createBadge(container: HTMLElement): void {
this.filterBadge = DOM.append(container, DOM.$('.markers-panel-filter-badge'));
this._register(attachStylerCallback(this.themeService, { badgeBackground, contrastBorder }, colors => {
this._register(attachStylerCallback(this.themeService, { badgeBackground, badgeForeground, contrastBorder }, colors => {
const background = colors.badgeBackground ? colors.badgeBackground.toString() : null;
const foreground = colors.badgeForeground ? colors.badgeForeground.toString() : null;
const border = colors.contrastBorder ? colors.contrastBorder.toString() : null;

this.filterBadge.style.backgroundColor = background;

this.filterBadge.style.borderWidth = border ? '1px' : null;
this.filterBadge.style.borderStyle = border ? 'solid' : null;
this.filterBadge.style.borderColor = border;
this.filterBadge.style.color = foreground;
}));
this.updateBadge();
this._register(this.filterController.onDidFilter(() => this.updateBadge()));
Expand Down

0 comments on commit 984a3a1

Please sign in to comment.