Skip to content

Commit

Permalink
Use same color as install button for recommendation indicator #36650
Browse files Browse the repository at this point in the history
  • Loading branch information
ramya-rao-a authored and egamma committed Oct 31, 2017
1 parent f228fef commit f3cd114
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
12 changes: 10 additions & 2 deletions src/vs/workbench/parts/extensions/browser/extensionsList.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,14 @@ import { IPagedRenderer } from 'vs/base/browser/ui/list/listPaging';
import { once } from 'vs/base/common/event';
import { domEvent } from 'vs/base/browser/event';
import { IExtension, IExtensionsWorkbenchService } from 'vs/workbench/parts/extensions/common/extensions';
import { InstallAction, UpdateAction, BuiltinStatusLabelAction, ManageExtensionAction, ReloadAction } from 'vs/workbench/parts/extensions/browser/extensionsActions';
import { InstallAction, UpdateAction, BuiltinStatusLabelAction, ManageExtensionAction, ReloadAction, extensionButtonProminentBackground } from 'vs/workbench/parts/extensions/browser/extensionsActions';
import { areSameExtensions } from 'vs/platform/extensionManagement/common/extensionManagementUtil';
import { Label, RatingsWidget, InstallWidget } from 'vs/workbench/parts/extensions/browser/extensionsWidgets';
import { EventType } from 'vs/base/common/events';
import { IContextMenuService } from 'vs/platform/contextview/browser/contextView';
import { IExtensionService } from 'vs/platform/extensions/common/extensions';
import { IExtensionTipsService } from 'vs/platform/extensionManagement/common/extensionManagement';
import { IThemeService } from 'vs/platform/theme/common/themeService';

export interface ITemplateData {
root: HTMLElement;
Expand Down Expand Up @@ -55,7 +56,8 @@ export class Renderer implements IPagedRenderer<IExtension, ITemplateData> {
@IMessageService private messageService: IMessageService,
@IExtensionsWorkbenchService private extensionsWorkbenchService: IExtensionsWorkbenchService,
@IExtensionService private extensionService: IExtensionService,
@IExtensionTipsService private extensionTipsService: IExtensionTipsService
@IExtensionTipsService private extensionTipsService: IExtensionTipsService,
@IThemeService private themeService: IThemeService
) {
this.showRecommendedLabel = showRecommendedLabel;
}
Expand All @@ -65,6 +67,12 @@ export class Renderer implements IPagedRenderer<IExtension, ITemplateData> {
renderTemplate(root: HTMLElement): ITemplateData {
const bookmark = append(root, $('span.bookmark'));
append(bookmark, $('span.octicon.octicon-star'));

let borderColor = this.themeService.getTheme().getColor(extensionButtonProminentBackground);
if (borderColor) {
bookmark.style.borderTopColor = borderColor.toString();
}

const element = append(root, $('.extension'));
const icon = append(element, $<HTMLImageElement>('img.icon'));
const details = append(element, $('.details'));
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@
height: 20px;
width: 20px;
border-right: 20px solid transparent;
border-top: 20px solid grey;
border-top: 20px solid;
box-sizing: border-box;
}

Expand Down

0 comments on commit f3cd114

Please sign in to comment.