From ab19d7b43db00f102db94c60711989a9e7e25ba5 Mon Sep 17 00:00:00 2001 From: DAVID DRUKER Date: Sun, 18 Mar 2018 14:06:12 -0700 Subject: [PATCH] add custom color for files added to index --- extensions/git/package.json | 9 +++++++++ extensions/git/package.nls.json | 1 + extensions/git/src/repository.ts | 3 ++- 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/extensions/git/package.json b/extensions/git/package.json index 8928bbace19..fa33511d151 100644 --- a/extensions/git/package.json +++ b/extensions/git/package.json @@ -968,6 +968,15 @@ } }, "colors": [ + { + "id": "gitDecoration.addedResourceForeground", + "description": "%colors.added%", + "defaults": { + "light": "#587c0c", + "dark": "#81b88b", + "highContrast": "#1b5225" + } + }, { "id": "gitDecoration.modifiedResourceForeground", "description": "%colors.modified%", diff --git a/extensions/git/package.nls.json b/extensions/git/package.nls.json index 6910adcbdad..0f9eb207222 100644 --- a/extensions/git/package.nls.json +++ b/extensions/git/package.nls.json @@ -70,6 +70,7 @@ "config.showInlineOpenFileAction": "Controls whether to show an inline Open File action in the Git changes view.", "config.inputValidation": "Controls when to show commit message input validation.", "config.detectSubmodules": "Controls whether to automatically detect git submodules.", + "colors.added": "Color for added resources.", "colors.modified": "Color for modified resources.", "colors.deleted": "Color for deleted resources.", "colors.untracked": "Color for untracked resources.", diff --git a/extensions/git/src/repository.ts b/extensions/git/src/repository.ts index 7586abee7eb..ea0fd97124c 100644 --- a/extensions/git/src/repository.ts +++ b/extensions/git/src/repository.ts @@ -217,7 +217,8 @@ export class Resource implements SourceControlResourceState { case Status.INDEX_DELETED: case Status.DELETED: return new ThemeColor('gitDecoration.deletedResourceForeground'); - case Status.INDEX_ADDED: // todo@joh - special color? + case Status.INDEX_ADDED: + return new ThemeColor('gitDecoration.addedResourceForeground'); case Status.INDEX_RENAMED: // todo@joh - special color? case Status.UNTRACKED: return new ThemeColor('gitDecoration.untrackedResourceForeground');