Skip to content

Commit

Permalink
Fix dapr icon contrast (#812)
Browse files Browse the repository at this point in the history
  • Loading branch information
MicroFish91 authored Dec 23, 2024
1 parent 77ce544 commit 0994519
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 21 deletions.
19 changes: 19 additions & 0 deletions resources/dapr-dark.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 19 additions & 0 deletions resources/dapr-light.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
18 changes: 0 additions & 18 deletions resources/dapr.svg

This file was deleted.

5 changes: 4 additions & 1 deletion src/tree/configurations/DaprItem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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,
}
}
Expand Down
3 changes: 1 addition & 2 deletions src/utils/treeUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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`);
}

Expand Down

0 comments on commit 0994519

Please sign in to comment.