From 1a0ca35f98456120627af1e92b2ac4d518ff0aad Mon Sep 17 00:00:00 2001 From: MicroFish91 <40250218+MicroFish91@users.noreply.github.com> Date: Fri, 20 Dec 2024 14:51:31 -0800 Subject: [PATCH] Fix dapr contrast --- resources/dapr-dark.svg | 19 +++++++++++++++++++ resources/dapr-light.svg | 19 +++++++++++++++++++ resources/dapr.svg | 18 ------------------ src/tree/configurations/DaprItem.ts | 5 ++++- src/utils/treeUtils.ts | 3 +-- 5 files changed, 43 insertions(+), 21 deletions(-) create mode 100644 resources/dapr-dark.svg create mode 100644 resources/dapr-light.svg delete mode 100644 resources/dapr.svg diff --git a/resources/dapr-dark.svg b/resources/dapr-dark.svg new file mode 100644 index 00000000..da10d8ce --- /dev/null +++ b/resources/dapr-dark.svg @@ -0,0 +1,19 @@ + + + + + + + + + + + diff --git a/resources/dapr-light.svg b/resources/dapr-light.svg new file mode 100644 index 00000000..99e4d4b2 --- /dev/null +++ b/resources/dapr-light.svg @@ -0,0 +1,19 @@ + + + + + + + + + + + diff --git a/resources/dapr.svg b/resources/dapr.svg deleted file mode 100644 index be569f22..00000000 --- a/resources/dapr.svg +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - - - - - diff --git a/src/tree/configurations/DaprItem.ts b/src/tree/configurations/DaprItem.ts index a01442e6..c7fd2b10 100644 --- a/src/tree/configurations/DaprItem.ts +++ b/src/tree/configurations/DaprItem.ts @@ -36,7 +36,10 @@ export class DaprEnabledItem implements TreeElementBase { label: localize('dapr', 'Dapr'), contextValue: DaprEnabledItem.contextValue, description: localize('enabled', 'Enabled'), - iconPath: treeUtils.getIconPath('dapr'), + iconPath: { + light: treeUtils.getIconPath('dapr-light'), + dark: treeUtils.getIconPath('dapr-dark'), + }, collapsibleState: TreeItemCollapsibleState.Collapsed, } } diff --git a/src/utils/treeUtils.ts b/src/utils/treeUtils.ts index 382d7665..f39ce823 100644 --- a/src/utils/treeUtils.ts +++ b/src/utils/treeUtils.ts @@ -3,13 +3,12 @@ * Licensed under the MIT License. See License.txt in the project root for license information. *--------------------------------------------------------------------------------------------*/ -import { type TreeItemIconPath } from '@microsoft/vscode-azext-utils'; import { Uri } from 'vscode'; import { ext } from '../extensionVariables'; import { type TreeElementBase } from '../tree/ContainerAppsBranchDataProvider'; export namespace treeUtils { - export function getIconPath(iconName: string): TreeItemIconPath { + export function getIconPath(iconName: string): Uri { return Uri.joinPath(getResourcesUri(), `${iconName}.svg`); }