From 54b363a611622a09272ebe9e824072939fdfcb95 Mon Sep 17 00:00:00 2001 From: "Christian W. Damus" Date: Thu, 27 Jul 2023 16:23:52 -0400 Subject: [PATCH] plugin-ext: default the folderExpanded icon In file icon themes, VS Code will use the "folder" icon also for expanded folders in the case that the theme omits the "folderExpanded" entry. Theia should do the same for consistency. Fixes #12727 Signed-off-by: Christian W. Damus --- .../src/main/browser/plugin-icon-theme-service.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/packages/plugin-ext/src/main/browser/plugin-icon-theme-service.ts b/packages/plugin-ext/src/main/browser/plugin-icon-theme-service.ts index 50290549acc36..7f364328b15ab 100644 --- a/packages/plugin-ext/src/main/browser/plugin-icon-theme-service.ts +++ b/packages/plugin-ext/src/main/browser/plugin-icon-theme-service.ts @@ -390,6 +390,12 @@ export class PluginIconTheme extends PluginIconThemeDefinition implements IconTh ): void { if (associations.folder) { accept(associations.folder, this.folderIcon); + if (associations.folderExpanded === undefined) { + // Use the same icon for expanded state (issue #12727). Check for + // undefined folderExpanded property to allow for + // "folderExpanded": null in case a developer really wants that + accept(associations.folder, this.folderExpandedIcon); + } this.hasFolderIcons = true; } if (associations.folderExpanded) {